Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

sed bash change line

user@cs ~/ $echo -e "I like soccer
You like football" 
| sed '/soccer/c Nobody likes soccer'
Nobody likes soccer
You like football
user@cs ~/ $cat bar.txt
One
Two
user@cs ~/ $sed '/One/c 1' bar.txt
1
Two
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sed #bash #change #line
ADD COMMENT
Topic
Name
5+7 =