Reputation: 63172
The following -F\\s
specifies any whitespace as a field delimiter for perl
$head simhash.txt | perl -F\\s -lane 'print $F[1]'
FRM_REL2
..
What is the way to specify only a space (e.g. not tab or other whitespace) as the delimiter?
Upvotes: 0
Views: 118
Reputation: 159
"You can't use literal whitespace in the pattern." (perldoc perlrun).
So you have to use another notations, hexadecimal for example:
head simhash.txt | perl -F/\\x20/ -lane 'print $F[1]'
Upvotes: 5