Re: Re Creating Email Notification - att: Alan Connor

From: Doug Laidlaw (laidlaws_at_myaccess.com.au)
Date: 09/04/03


Date: Thu, 04 Sep 2003 18:26:32 +1000

Alan Connor wrote:

> 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
>
>
The command you gave me showed the problem. I had got the script again from
the Web using Windows and pasted from the Windows text file into .bashrc and
the failed_notify script. There were added <CRs>. Stripping them fixed it.

Thanks again,

Doug.

-- 
Registered Linux User No. 277548.
They say lightning never strikes twice in the same place.  My typing is
about as accurate.  Apologies for any typos that slip in. - Doug.


Relevant Pages

  • Re: Re Creating Email Notification - att: Alan Connor
    ... > Hi again Alan. ... > You gave me a script with an entry in .bashrc starting: ... > (That's a curly brace. ... will show you where the newlines are. ...
    (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: path problems in 2009b
    ... > "Alan B" wrote in message ... is not found in the>> current directory or on the MATLAB path" dialog box. ... This happens regardless of the location of the script, the>> contents of the path variable, and the current working directory. ... I never saw this> problem before upgrading to 2009b. ...
    (comp.soft-sys.matlab)
  • 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)