Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

How to change first occurrence of word in a string

sed 's/change/changeWith/1' FileName.txt 
sed 's/change/changeWith/g' FileName.txt ## global change for every occurence  
 
PREVIOUS NEXT
Tagged: #How #change #occurrence #word #string
ADD COMMENT
Topic
Name
9+4 =