Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash replace string

#1) Open the file in vi or vim
#2) Run the replacement command in vi (or vim) as follows

# Replace all matching patterns
:s%/PatternToReplace/Replacement

# Replace one matching pattern at a time
:s/PatternToReplace/Replacement
Source by reactgo.com #
 
PREVIOUS NEXT
Tagged: #bash #replace #string
ADD COMMENT
Topic
Name
9+8 =