Using the Windows port of SED?
Posted: 2022-Jan-01, 8:24 pm
This page;
http://gnuwin32.sourceforge.net/
Includes Windows ports of Linux utilities. I downloaded the Windows port of SED 4.2.1, however I literally can't get it to do anything. I have copied numerous examples off the net and even off the SED documentation page, but no matter what I try, all I get is;
sed: -e expression #1, char 1: unknown command: `''
To test it, I created a one-line text file with the line "This is a test", then I issued the command;
Which the documentation says will do a search and replace on the given file. Nope. I just get that stupid error.
I have tried other examples as well and none of them work. I thought maybe it might be a problem with SED expecting a newer version of Windows than I have (I have an old system), so I found an older version, 3.02 and that does the same exact thing!
I'm at a loss here. Does the Windows port of SED just not work? Is there some other parameter I need to include that isn't mentioned anywhere on the net?
http://gnuwin32.sourceforge.net/
Includes Windows ports of Linux utilities. I downloaded the Windows port of SED 4.2.1, however I literally can't get it to do anything. I have copied numerous examples off the net and even off the SED documentation page, but no matter what I try, all I get is;
sed: -e expression #1, char 1: unknown command: `''
To test it, I created a one-line text file with the line "This is a test", then I issued the command;
Code: Select all
sed 's/test/text/' test.txt
I have tried other examples as well and none of them work. I thought maybe it might be a problem with SED expecting a newer version of Windows than I have (I have an old system), so I found an older version, 3.02 and that does the same exact thing!
I'm at a loss here. Does the Windows port of SED just not work? Is there some other parameter I need to include that isn't mentioned anywhere on the net?