[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash - bad interpreter: no such file og catalog
From: |
Paul Jarc |
Subject: |
Re: bash - bad interpreter: no such file og catalog |
Date: |
Wed, 07 Aug 2002 14:30:13 -0400 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i686-pc-linux-gnu) |
dmuren@start.no (Djm) wrote:
> fm@sophia.inria.fr (Francis Montagnac) wrote in message
> news:<aiouj3$eg7$1@news-sop.inria.fr>...
>> if test x"$1" = x
>>
>> could be written:
>>
>> if [ "$1" ]
>
>
> If I am to use the "if [ "$1" ]" mentioned above, what will I have to
> do where "test" appears other places in the script??
In each case, you can leave it as-is, or you can replace "test" with
"[" and add "]" at the end. It's ok to use both forms in the same
script; the choice is purely aesthetic.
> What does "test -f" mean?
Run "help test" to find out.
> I have changed the comment signs to # and now the script is listing
> out my pending_messages, but I get an ;
> ./ok: line 21: syntax error near unexpected token `elif'
> '/ok: line 21: ` elif test -f
> $HOME/procmail/pending_messages/$1
>
> Do you know why?
For help with writing scripts, go to news:comp.unix.shell. Post your
script there.
paul