Re: Problem with positional output
| Newsgroups | gmane.editors.sed.user |
|---|---|
| Message-ID | <CAEE75_1MUMiMrtdiB4RGRP0Fv7hxJsogjua5SwbQ0K032g3dEQ@mail.gmail.com> |
I think Stephane's method is best, though I don't see the need for the
noglob here, I think
(IFS=\|; set -- $RETVAL; printf %s\\n "$3")
As an alternative if your data doesn't contain newlines, awk is
specialized for this,
awk -F\| '{print $3}' <<<"$RETVAL"
will do the same job.