| Newsgroups |
gmane.editors.sed.user |
| Message-ID |
<[email protected]> |
You could also do it without resorting to expensive backrefs, like as,
printf '%s\n' "$RETVAL" | sed -n 's/|/\n/;P'
---In [email protected], <linux4michelle@...> wrote :
Grmpf!
Now I have to reply to myself!
On 2016-11-14 14:03:50 Michelle Konzack hacked into the keyboard:
> Hello *,
>
> after 4 years of Linux/OSS abstinence I am back and I run into troubles,
> because I have forgotten ho to get values from a string...
>
>
> The string has 4 parameters, deperated by the | sign and I like to get
> it with something like
>
> echo "${RETVAL}" |sed 's!(.*)|(.*)|(.*)!$1!'
This is now working with:
echo "${RETVAL}" |sed 's!\(.*\)|\(.*\)|\(.*\)!\1!'
Greetings
--
Michelle Konzack ITSystems
GNU/Linux Developer 0033-6-61925193
[Non-text portions of this message have been removed]