I wasn't sure how to word this question but basically I have been using a shell script to process sam data. Here's the shell script.
nano picard_SortandIndex_from_sam.sh
for A in *sam; do ls $A; picard SortSam I=$A O=$A".bam" SO=coordinate CREATE_INDEX=TRUE; done
And this is the command I run where I get only one .out file for all the sam files processed.
nohup sh picard_SortandIndex_from_sam.sh > picard_SortandIndex_from_sam5_26_21.out &
Is there a way to generate .out files within my "picard_SortandIndex_from_sam.sh" script so I can have a summary file for each sam file processed? I tried to put > $A".out" in there but it didn't work...
Many thanks!
ls
output aswell, wrap the part betweendo
anddone
like shown above, then redirect that ({ ls [...], picard [...] } >"$A".out
) – Panki Sep 08 '21 at 15:41