bash:strings:find_replace
This is an old revision of the document!
BASH - Strings - Find & Replace
var="abcdabe" echo ${var/ab/fg}
returns:
fgcdabe
NOTE: Only the first match is changed.
To change all occurrences use:
var="abcdabe" echo ${var//ab/fg}
returns:
fgcdfge
bash/strings/find_replace.1612972756.txt.gz · Last modified: 2021/02/10 15:59 by peter