bug-bash
[Top][All Lists]
Advanced

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

bash - bad interpreter: no such file og catalog


From: Djm
Subject: bash - bad interpreter: no such file og catalog
Date: 6 Aug 2002 09:09:39 -0700

Hello...

I need some help with a script I have. why does it not work.
This is where my files are
$home/procmail/.accept_list
$home/procmail/pending_messages (Where all the mails are pending)
$home/.procmailrc

I get a syntax error when running /bin/bash ./ok.
: No such file or catalog
./ok: Checking: command not found
./ok: line 13: syntax error near unexpected token `x(3'
'/ok: line 13: `        ls -t $HOME/procmail/pending_messages | head
-46 | perl -ne 'print " " x(30-index($_,"@")),$_'

But running the last line for it self (ls - t.....) is no problem.

Can anyone help??

#!/bin/bash
/*
Checking cached mail
Periodically ~W I do it every couple of days ~W you should check to
see if any "real people" have left messages in your pending_messages
cache, either because they didn't see procmail's autoreply, or because
they for some reason couldn't answer.

There's a simple Bourne shell script for this here. I call it "ok" and
just telnet to my mail server and run it from the command line. With
no arguments, it lists the last thirty addresses from which mail was
cached. Give it an e-mail address, and it'll deliver any cached mail
from that address and add it to the accept list.

(It would be easy and clever to hack up a Web interface for this, if
you can run CGIs on your mail server.)
*/

if test x"$1" = x
then
        ls -t $HOME/procmail/pending_messages | head -46 | perl -ne
'print " " x(30-index($_,"@")),$_'
else
        if test -f $HOME/procmail/pending_messages/$1
        then
                formail -rzxTo: < $HOME/procmail/pending_messages/$1
>> $HOME/procmail/.accept-list && \
                cat $HOME/procmail/pending_messages/$1 >> $MAIL && \
                rm $HOME/procmail/pending_messages/$1
        elif test -f $HOME/procmail/pending_messages/$1
        then
                formail -rzxTo: < $HOME/$1 >>
$HOME/procmail/.accept-list && \
                cat $HOME/procmail/pending_messages/$1 >> $MAIL && \
                rm $HOME/procmail/pending_messages/$1
        else
                echo $1 >> $HOME/procmail/.accept-list
        fi
fi



reply via email to

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