Answers for "how to delete a word from a file in bash"

1

how to delete a word from a file in bash

sed -i 's/word-to-find//g' input.file.path

#note: if you are word-to-find is a variable, put it in single quotations > ex : 's/'$var'//g'
Posted by: Guest on January-22-2022

Code answers related to "how to delete a word from a file in bash"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language