[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with "ed"
From: |
Bob Proulx |
Subject: |
Re: Problem with "ed" |
Date: |
Thu, 15 Sep 2005 02:03:22 -0600 |
User-agent: |
Mutt/1.5.9i |
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