[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] Substring Replacement
From: |
Richard Taubo |
Subject: |
[Help-bash] Substring Replacement |
Date: |
Fri, 30 May 2014 18:34:47 +0200 |
Hi!
On http://tldp.org/LDP/abs/html/string-manipulation.html I find the following
example:
stringZ=abcABC123ABCabc
echo ${stringZ//abc/xyz} # xyzABC123ABCxyz
# Replaces all matches
of 'abc' with # 'xyz'.
If you are forced to run everything on one line without using variables, how
could one accomplish this, e.g:
echo "abcABC123ABCabc" | echo ${????//abc/xyz}
Thanks for feedback!
Best regards,
Richard Taubo
- [Help-bash] Substring Replacement,
Richard Taubo <=