trying to use sed command unsuccessfully

c:\dct\ is what I want to have replaced with *raw

sed -i 's/\c:\dct\/*/raw/g' adm2014.do

i think the espace characters are throwing me off.

You can use any delimiting character with sed and the backslash and astereisk need to be escaped. If you use a # as your delimiter this should work:

sed -i 's#c:\\dct\\#\*raw#g' adm2014.do

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.