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. | [reply] [Watch: Dir/Any] [d/l] [select] |
Same output as before unfortunately.
| [reply] [Watch: Dir/Any] |
On the command line, make a backup of the file, then type vi input.txt, then inside of vi, type :set ff=unix, hit ENTER, then type :wq. It would be worth noting whether the file appears as you expect before you run the above commands.
That'll set line endings to \n (at least it should). Then run your original one-liner to see if that worked.
| [reply] [Watch: Dir/Any] [d/l] [select] |