I read Bash : extracting part of a string.
How could I achieve this but for all matches inside a string:
x=something
echo ${x ome}
^
what to put here to get "sthing"
Any other suggestions are appreciated.
I read Bash : extracting part of a string.
How could I achieve this but for all matches inside a string:
x=something
echo ${x ome}
^
what to put here to get "sthing"
Any other suggestions are appreciated.
It was too simple:
${x/ome/}
Another question that occurs to me now, is how could I put regular expressions inside the slashes but this is good for now.
bash man page, scrolling down to ${parameter/pattern/string}.