bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with "ed"


From: Mike McElroy
Subject: Re: Problem with "ed"
Date: Thu, 15 Sep 2005 08:10:38 -0400
User-agent: Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720)

Bob Proulx wrote:

address@hidden wrote:
I apologize if this is the wrong place to send this question.

GNU ed has not been updated in some time.  So I suppose without a
better place this one is as good as any.

This a little test I'm doing that doesn't seem to work, but I can't see anything wrong with it. Is this a bug?

Looks like a minor bug.

# Create an input file
cat << \EOF > -infile
aaa
bbb
aaa
EOF

#Create an input command file
cat << \EOF > cmdfile
1,$s/aaa/bbb/
w
q
EOF

#This command fails with or without '-s' option.
ed -s -- -infile < cmdfile

#The command returns a ?
echo $?
#returns 4. Don't have a clue what this means.

The 'ed' command appears to be not stopping option processing with the
"--".  Instead it appears to be processing -infile as an option and
erroring.

Try this:

 ed -s ./-infile < cmdfile

That should work.

Bob

Thank you. That works. Unfortunately I can't change the filename because it is part of an Xopen testsuite. Is it sufficient to post here or do I have to send mail here to somewhere else in Gnu to get this looked at?

Mike




reply via email to

[Prev in Thread] Current Thread [Next in Thread]