[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Including ' in a sed command



iHi All,

(Typed, rather than cut/pasted so apologies if there's a typo)

This is part of a sed command in a bash script.

sed 's/["'"'"']//'

This matches " or '. It works.

But it's 'unreadable' and almost impossible to find the typo if it's wrong.

Is there a better way of writing it? the obvious '["\']' doesn't work.

Tim.


Reply to: