您的位置:首页 > 博客中心 > 网络系统 >

shell sed 多行执行多个命令

时间:2022-04-03 16:17

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 % 

 

 

 

 

 

 

 

 

 

 

本类排行

今日推荐

热门手游