[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

cut(1) and space delimiters



Googled and followed examples, which work, but my specific problem doesn't work...

WORKS:
$ service="http mail ssh"
$ echo $service | cut -d\  -f2
mail
$ echo $service | cut -d' ' -f2
mail
dpkg --get-selections | grep -v deinstall$ | awk '{print $1}'


DOES NOT WORK:
$ dpkg --get-selections | grep -v deinstall$ | cut -d' ' -f1
$ dpkg --get-selections | grep -v deinstall$ | cut -d\  -f1


Is the problem that there's so *much* whitespace in the dpkg listing?

--
Obsession with "preserving cultural heritage" is a racist impediment
to moral, physical and intellectual progress.


Reply to: