SED command in UNIX -


i want remove below string file in unix:

<?xml version='1.0' encoding='utf-8'?> 

the file content this:

<?xml version='1.0' encoding='utf-8'?>hello world 

in 1 single continuous line.

i using following command achieve same:

sed s'/<?xml version='1.0' encoding='utf-8'?>//g' myfile > myfile1 

however, resultant file myfile1 still having string.

how achieve ?

use double quotes outer quotes avoid escape issue:

sed "s/<?xml version='1.0' encoding='utf-8'?>//g" myfile > myfile1 

Comments

Popular posts from this blog

python - How to create a legend for 3D bar in matplotlib? -

php - Dynamic url re-writing using htaccess -

java - Multi-Label Document Classification -