#替换,将“;hello.desktop;”替换为“;”
#sed 's/;hello.desktop;/;/g' test>hello.tmpout
#mv hello.tmpout test
#追加,将包含“hello”的所有行后追加“this is a example”的新行
#sed '/hello/a\this is a example' test
#追加,将包含“kdkkdkdkdkkd”的所有行尾追加“hello.desktop;”,没有新行出现
sed -i's/kdkkdkdkdkkd.*/&hello.desktop;/' test