3 ms·
> [...] you need to flatten the whitespace first with sed by "flatten the whitespace" do you mean turning many spaces into one space? If so, I have always used
by jsrn 17y ago
> [...] you need to flatten the whitespace first with sed
by "flatten the whitespace" do you mean turning many spaces into one space? If so, I have always used tr with the -s (squeeze) option for that:
$ echo "one two three" | tr -s " " | cut -d " " -f 3
three
- silentbicycle 17y agoDidn't know about that option, I always did it with sed. Thanks! :)