shell sed 单行执行多个命令

code

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 % 
macname@localhost Desktop % sed -e 's/jumps/green/; s/dog/cat/' content
fox green over the lazy cat. 
fox green over the lazy cat. 
fox green over the lazy cat. 
fox green over the lazy cat.
macname@localhost Desktop % 
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 % 

原文地址:https://www.cnblogs.com/sea-stream/p/14044927.html