^word^replacement^ on all matches in Bash? May 12, 2023 by Tarik Try this: $ echo oneone oneone $ !!:gs/one/two/ # Repeats last command; substitutes 'one' --> 'two'. twotwo