Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to delete a word from a bash file

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'

 
PREVIOUS NEXT
Tagged: #delete #word #bash #file
ADD COMMENT
Topic
Name
2+7 =