Replace all occurrences of a string, expansion, bash

hey= is is is is is is wow
echo ${hey/is/damn}

this is going to output

damn is is is is is wow

to replace all occurences

${hey//is/damn}

output is

damn damn damn damn damn wow

Leave a Reply

Your email address will not be published.