Reputation: 347
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?
Upvotes: 2
Views: 62
Reputation: 85883
You need to quote the script (single quotes as the text already contains double quotes):
$ sed -i '/^<Field name="LastDate"/d' test.xml
Upvotes: 2