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

Re: delimiters with more than one character? ...



On Wed, Jul 15, 2020 at 06:29:38AM -0400, Albretch Mueller wrote:
> On 7/14/20, Nicolas George <george@nsup.org> wrote:
> > Bob Weber (12020-07-14):
> >> echo " 34 + 45 \| abc \| 1 2 3 \| c\|123abc " | tr -d '\\' | awk 'BEGIN {
> >> FS="|" } { printf "
> >> _S_AR=(\n\"%s\"\n\"%s\"\n\"%s\"\n\"%s\"\n\"%s\"\n)\n",$1,$2,$3,$4,$5}'
> >
> > Have you considered that pipes without backslashes are not supposed to
> > be separators?
> 
>  the thing is that that was the one liner passed to a find command
> which then I need to use as an array

I'm pretty sure you don't mean "find" here.

GNU grep, perhaps?  GNU grep is infamous for its many stupid extensions,
one of which is the use of \| in BRE mode to simulate | from ERE mode.


Reply to: