Using SED on Windows xp-GnuWin32


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Using SED on Windows xp-GnuWin32
# 1  
Old 05-08-2009
Using SED on Windows xp-GnuWin32

I installed the GnuWin32 tools on my Windows XP system but I cannot .. for the life of me .. get the SED tool to work for me.

All I need to do is remove blank lines for a text file. My script is ...
Code:
sed -e '/^$/ d' xxx.txt > yyy.txt

The error msg is:
Code:
sed: -e expression #1, char 1: unknown command: `''

I've tried remove the single quotes, using the -f parameter, etc.

Do I need to do something re/DOS?

Thanks, Ms. Holmberg






Last edited by Yogesh Sawant; 05-08-2009 at 09:53 AM.. Reason: added code tags
# 2  
Old 05-08-2009
try double quotes instead of single.
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed in windows does not parse curly braces

Hi everyone: I'm stuck at this point, could you guys please give me some hints about what I am doing wrong in the following script, I'm using sed for windows: sed ^"$ {^ a^ STRINGTABLE DISCARDABLE^ BEGIN^ #define CLIENT_MODULE, "%CLIENT_MODULE%"^ #define CLIENT_ID, "%CLIENT_ID%"^... (1 Reply)
Discussion started by: edgarvm
1 Replies

2. Shell Programming and Scripting

[gnuwin32] sed & variable %TIME%

HI.. I made ".bat" in windows 2003 , with set TIEMPO1= %TIME% | sed -e "s/://g" -e "s/,//g" echo valor de tiempo1 = %TIEMPO1% when i execute this, the result is but if i open cmd, and execute en line command this.. G:\>echo %TIME% | sed -e "s/://g" -e "s/,//g" 12390841 anyone have... (5 Replies)
Discussion started by: upszot
5 Replies

3. Shell Programming and Scripting

SED Command :: UNIX to Windows

hello people Please tell me the Windows equivalent for the SED command used in the UNIX shell scripts. In Unix this command is used to replace a string by another in a file. Thanks in Advance! (10 Replies)
Discussion started by: iim freak
10 Replies

4. UNIX for Dummies Questions & Answers

GnuWin32 sed 4.1.4 regexp matching

I am using GnuWin32 sed and am having trouble with the regexp - i.e., they don't behave the same way as in UNIX (POSIX and and all that). I have a stream of data, e.g.: 11111'222?'22'33?'333'44444'55555' I want to insert a \n after those apostrophes that are *not* preceded by a ?. ... (2 Replies)
Discussion started by: Simerian
2 Replies
Login or Register to Ask a Question