bug-coreutils
[Top][All Lists]
Advanced

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

Re: cut feature request - delimiters longer than one character


From: Pádraig Brady
Subject: Re: cut feature request - delimiters longer than one character
Date: Sun, 03 Jan 2010 11:22:56 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0

On 02/01/10 17:35, Nexor wrote:
Hello!

I would love to see the --delimiter option accept (and use) strings
longer than one character - what do you think?

Well one often requires more general regular expression matching
in addition to string matching, and keeping both within a tool like
sed is probably more cohesive? If one wanted to split on "--" for
example then you could do somthing like:

echo "1--2--3" | sed 's/--/\x00/g' | cut -d '' -f2

cheers,
Pádraig.




reply via email to

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