且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

删除特定字符串后的所有内容

更新时间:2023-02-21 13:49:39

mathb@Balu:~$ sed -i.bak 's/with.*//g' file.txt
mathb@Balu:~$ cat file.txt
Brown Potatoes

Yellow Potatoes
mathb@Balu:~$