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

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

Re: ed: please give me a little control over appending final newlines


From: Paul Jarc
Subject: Re: ed: please give me a little control over appending final newlines
Date: Fri, 01 Mar 2002 18:05:42 -0500
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/20.7 (i386-redhat-linux-gnu)

"Andrew L. Moore" <address@hidden> wrote:
> In message <address@hidden>, Andreas Schwab writes:
>>|>     if [ ."$@" = . ]; then ed "$TMP"; else ed "$@" "$TMP"; fi
>>             ^^^^
>>This will expand to more than one word if $# > 1, probably giving a
>>syntax error from test.  The test is not nessary at all, just use the
>>else branch unconditionally.
>
> In the particular case of ed(1), "" is interpreted as an illegal file name.

I think any shell that expands "$@" to a single empty word instead of
no words when $# is zero will also fail to understand the $() syntax.


paul



reply via email to

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