shell sed替换文本

code

macname@localhost Desktop % cat content 
fox jumps over the lazy dog. 
fox jumps over the lazy dog. 
fox jumps over the lazy dog. 
fox jumps over the lazy dog.
macname@localhost Desktop % 
macname@localhost Desktop % sed 's/dog/cat/' content
fox jumps over the lazy cat. 
fox jumps over the lazy cat. 
fox jumps over the lazy cat. 
fox jumps over the lazy cat.
macname@localhost Desktop % 
macname@localhost Desktop % cat content 
fox jumps over the lazy dog. 
fox jumps over the lazy dog. 
fox jumps over the lazy dog. 
fox jumps over the lazy dog.
macname@localhost Desktop % 

 

 

 

 

 

 

 

posted @ 2020-11-26 21:42  anobscureretreat  阅读(163)  评论(0编辑  收藏  举报