3
1
I am attempting to use SED for the first time. To complicate matters, i am using it in windows.
I downloaded from this source. Since I don't have install privileges on my work machine I created a folder in my profile for executables and added it to my PATH
.
I am having issues try to use SED for the first time. It keeps failing with the error:
sed: -e expression #1, char 1: unknown command:
``''`
I have tried a few different samples from This how to but I just can't get it. I found none else is having this problem. What should I try? I have tried encapsulating it in quotes, double quotes and back-quotes. Nothing seems to help.
What exactly are you running? – johnny – 2012-02-15T16:08:08.370
I would highly recommend cygwin, the windows shell is such a PITA for unix-like commands. However, if you are planning on sticking with the windows shell, the easiest way ive found to run sed or awk is by creating a script file and then calling the file with the -f flag. For example
sed -f some_sed_script.sed
orawk -f some_awk_script.awk
– SiegeX – 2012-02-15T17:10:46.270Can you paste exactly what you're giving to the windows shell? – Rob – 2012-02-15T17:17:45.207
I thought I did include my input. I wish i did, because now it works after I tried @RedGrittyBrick gave – TheSavo – 2012-02-15T18:09:19.390