Hello!
I'm working with a .bam file and I want extract line by line. I'm trying to use the following bash command:
for line in `samtools view filename.bam`
do
something
done
but it doesn't works because the variable line will be a single field of .bam file. How can I assign at variable the entire line?
Thanks!
This would be my solution too, assuming that "samtools view" outputs a multi-line file.
Do you mean multi-line stdout? A file would need to be handled with cat file | ..
yeah, I meant stdout :-)