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

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



On Wed 15 Jul 2020 at 06:29:38 (-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 at a loss. Why make up a string with difficult-to-handle
delimiters, and then try to turn it into an array?

Why not put those strings into an array, and then use that array to
build your find command?

And what is it about one-liners? Are you in some sort of shelling competition?

Cheers,
David.


Reply to: