Re: Re Creating Email Notification - att: Alan Connor
From: Doug Laidlaw (laidlaws_at_myaccess.com.au)
Date: 09/04/03
- Next message: Peter T. Breuer: "Re: Q: why are linefeeds lost in this 2 line sed script?"
- Previous message: John Winters: "Re: The incentive to respond is derived from the incentive to send the original message that triggered the challenge."
- In reply to: Alan Connor: "Re: Re Creating Email Notification - att: Alan Connor"
- Next in thread: Alan Connor: "Re: Re Creating Email Notification - att: Alan Connor"
- Reply: Alan Connor: "Re: Re Creating Email Notification - att: Alan Connor"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Peter T. Breuer: "Re: Q: why are linefeeds lost in this 2 line sed script?"
- Previous message: John Winters: "Re: The incentive to respond is derived from the incentive to send the original message that triggered the challenge."
- In reply to: Alan Connor: "Re: Re Creating Email Notification - att: Alan Connor"
- Next in thread: Alan Connor: "Re: Re Creating Email Notification - att: Alan Connor"
- Reply: Alan Connor: "Re: Re Creating Email Notification - att: Alan Connor"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|