Skip to content

Instantly share code, notes, and snippets.

@andilabs
Last active December 21, 2015 18:59
Show Gist options
  • Save andilabs/6351077 to your computer and use it in GitHub Desktop.
Save andilabs/6351077 to your computer and use it in GitHub Desktop.
BASH: replace all ocurences of 'abc' with 'XYZ' in given textfile Bash, like other shells, is just a tool for coordinating other commands. Typically you would try to use standard UNIX commands, but you can of course use Bash to invoke anything, including your own compiled programs, other shell scripts, Python and Perl scripts etc. In this case, …
sed 's/abc/XYZ/g' <infile >outfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment