Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Execution of script.sed gives error in ubuntu?

I have a .sed script in which I have a code to make changes in a dataset. The code is as follows:

"s/,BEL,/,Belgium,/g" -e "s/,IT,/,Italy,/g" 

However when I run it as follows I get the following error:

sed -f script.sed dataset.csv

sed: file script.sed line 1: Unknown command: '"'

Any idea of what I may be doing wrong?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Replace

"s/,BEL,/,Belgium,/g" -e "s/,IT,/,Italy,/g"

with

s/,BEL,/,Belgium,/g
s/,IT,/,Italy,/g
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading