in reply to Re: command line perl reading from STDIN
in thread command line perl reading from STDIN
cat input_file.fq | perl -ne '$s=<>;<>;<>;chomp($s);print length($s)."\n";' > output.txt
Ok, but for the above, if we were to step-by-step describe what is going on. How would it be described? It just that from the above I thought it would assign $s on every line OR skip 2 lines and then assign $s to the third line and repeat.
Ok, but for the above, if we were to step-by-step describe what is going on. How would it be described? It just that from the above I thought it would assign $s on every line OR skip 2 lines and then assign $s to the third line and repeat.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: command line perl reading from STDIN
by choroba (Cardinal) on Jan 22, 2013 at 18:02 UTC | |
by perlhappy (Novice) on Jan 22, 2013 at 18:14 UTC | |
Re^3: command line perl reading from STDIN
by perlhappy (Novice) on Jan 22, 2013 at 18:12 UTC | |
by Anonymous Monk on Jan 23, 2013 at 23:32 UTC |
In Section
Seekers of Perl Wisdom