Lazy Programmer

Your source for the latest in deep learning, big data, data science, and artificial intelligence. Sign up now

Find and Replace Text from the Command Line in Linux

December 10, 2013

Use sed

sed -i 's/<original_text>/<replacement_text>/' <file.txt>

Example:

sed -i 's/Bob/Alice/' names.txt