Re: Re Creating Email Notification - att: Alan Connor

From: Alan Connor (alanconnor_at_earthlink.net)
Date: 09/04/03


Date: Thu, 04 Sep 2003 07:23:18 GMT

On Thu, 04 Sep 2003 11:30:16 +1000, Doug Laidlaw <laidlaws@myaccess.com.au> wrote:
>
>
> Hi again Alan.
>
> You gave me a script with an entry in .bashrc starting:
>
> news () {
>
> (That's a curly brace. It doesn't look like it as I type.)
>
> Now every time I open a Konsole it has two lines:
>
> 'ash: /home/doug/.bashrc: line 10: syntax error near unexpected token `{
> 'ash: /home/doug/.bashrc: line 10: `news () {
>
> My shell is bash. It is usually spelled correctly in these messages.
>
> What is wrong?
>
> Doug.

Hey Doug. I don't remember the function, exactly.

Is the other, closing bracket there? (On its own line.) i
Is there a space after that first one?

$ cat -e .bashrc | less

will show you where the newlines are.

m () {

        fetchmail && if [ -s ~/Mail/inbox ] ;
        then rhn ;
        sleep 3 ;
        mutt ;
        fi ;

}

That's a VERY correct function, with the ";" wherever a newline would be.

There's no spaces after the curly brackets, and no tabs. I use that function
ALL the time. (rhn is a script)

It wouldn't hurt to repost the function. I may be able to improve on it.

Alan C

-- 
  
   take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a


Relevant Pages

  • Re: Re Creating Email Notification - att: Alan Connor
    ... Alan Connor wrote: ... >> (That's a curly brace. ... > Hey Doug. ... I had got the script again from ...
    (comp.os.linux.misc)
  • Re: Bill Weber??
    ... > I think Alan works better with a script (even such as it is on ... I have said all along that the chemistry just isn't right for Alan ... Let the Fox crew do the entire season! ... Ya' gotta figure the NBC suits are ...
    (rec.autos.sport.nascar.moderated)
  • Re: Invalid syntax error on some URL links in OE
    ... >> Alan J Robertson wrote: ... > Uncheck the box to Display a notification about every script error. ... > Windows Script 5.6 for Windows 2000 and XP ... > Sometimes there's a corrupt file in the cache and one must go to ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)
  • Re: An Amazing Fact
    ... Alan is not then first designer of a "challenge" system. ... there must be some good reasons. ... For lot of people e-mails ... Why should I install a script of a single script-kiddie to destroy ...
    (comp.os.linux.misc)
  • Re: groupadd, useradd, etc
    ... The start looks OK on the machine that this problem first appeared on, ... the first group I added - alan. ... I'm adding users from a script which is creating them in alphabetical ... echo usermod -G sambashare,alan alan failed. ...
    (Fedora)