2

I want to remove a line which begins with <Field name="LastDate" in a xml file.

The space seems to be creating issues here sed -i /^<Field name="LastDate"/d test.xml. How do I go about this?

4

1 に答える 1

2

スクリプトを引用する必要があります(テキストにはすでに二重引用符が含まれているため、一重引用符)

$ sed -i '/^<Field name="LastDate"/d' test.xml
于 2013-03-20T14:02:22.337 に答える