Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex 如何使用sed删除带有空格的行?_Regex_Linux_Shell - Fatal编程技术网

Regex 如何使用sed删除带有空格的行?

Regex 如何使用sed删除带有空格的行?,regex,linux,shell,Regex,Linux,Shell,我想删除以开头的一行,您需要引用脚本(单引号,因为文本已经包含双引号): $sed-i'/^谢谢,看起来不错。 $ sed -i '/^<Field name="LastDate"/d' test.xml

我想删除以
开头的一行,您需要引用脚本(单引号,因为文本已经包含双引号):


$sed-i'/^谢谢,看起来不错。
$ sed -i '/^<Field name="LastDate"/d' test.xml