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 % 
macname@localhost Desktop % sed -e '
quote> s/jumps/green/
quote> s/fox/elephant/
quote> s/dog/cat/' content
elephant green over the lazy cat. 
elephant green over the lazy cat. 
elephant green over the lazy cat. 
elephant green 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 22:18  anobscureretreat  阅读(747)  评论(0编辑  收藏  举报