in reply to Re^4: One-liner only checking the first line of the input file
in thread One-liner only checking the first line of the input file
That's a MacOS line ending \r, aka a carriage return. See if this works:
perl -012 -lane 'print "$F[2]\t$F[7]" if $F[7] > 0' < input.txt
The -0 flag sets the input record separator (line ending) to \r in octal form.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: One-liner only checking the first line of the input file
by TJCooper (Beadle) on Nov 11, 2015 at 15:13 UTC | |
by stevieb (Canon) on Nov 11, 2015 at 15:18 UTC | |
by TJCooper (Beadle) on Nov 11, 2015 at 15:28 UTC | |
by stevieb (Canon) on Nov 11, 2015 at 15:56 UTC | |
by 1nickt (Canon) on Nov 12, 2015 at 14:36 UTC | |
|
In Section
Seekers of Perl Wisdom