Asked By: Roma Runolfsdottir
Date created: Tue, Mar 30, 2021 7:49 PM
Date updated: Thu, Jul 21, 2022 5:44 PM
Video answer: Bash basics
Top best answers to the question «Bash script how to edit a txt file»
- The easiest way is to use sed (or perl): sed -i -e 's/abc/XYZ/g' /tmp/file.txt Which will invoke sed to do an in-place edit due to the -i option. This can be called from bash.
Video answer: How to edit a file in bash