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

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -