bug-textutils
[Top][All Lists]
Advanced

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

"cut" field delimeter


From: Mark Fenbers
Subject: "cut" field delimeter
Date: Sun, 15 Jun 2003 13:34:08 -0400

I surely wish that the "cut" utility would make use of regular expressions
[regexp(5)] as field delimeters.  So many times I have to use "awk" where "cut"
would be simpler and quicker, but my fields are separated by more than one
character.  (Awk allows regexps in the -F switch.)  Something like:

    cut -d"[\t ,]+" -f1-3 myfile

would make "cut" infinitely more useful.  The example above would tell "cut"
that the fields are delimited by 1 or more consecutive spaces and/or tabs and/or
commas.

Mark

reply via email to

[Prev in Thread] Current Thread [Next in Thread]