Linux Newbie help
 help / color / mirror / Atom feed
From: "Brian Jackson" <brian-kernel-list@mdrx.com>
To: Daniel Peter Cavanagh <nofsk@vtown.com.au>
Cc: linux-newbie@vger.kernel.org
Subject: Re: bash script problem
Date: Tue, 10 Dec 2002 11:07:30 -0600	[thread overview]
Message-ID: <20021210170730.25546.qmail@escalade.vistahp.com> (raw)
In-Reply-To: <3DF54C86.7070908@vtown.com.au>

Try this: 

fetchmail -su nofsk pop.vtown.com.au && pine || echo failed fetch 

see if that works for you. 

 --Brian Jackson 

Daniel Peter Cavanagh writes: 

> Hi, 
> 
> I'd like to write a script that will run a command, and if successful run 
> another command otherwise echo a message. 
> 
> This is what I have but it doesn't work (I've never written a bash script 
> before): 
> 
> if [ `fetchmail -su nofsk pop.vtown.com.au` ]; then
>    pine
> else
>    echo failed fetch
> fi 
> 
> Could something please fix this up. Thanks for your help, Daniel. 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.linux-learn.org/faqs
 
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

      parent reply	other threads:[~2002-12-10 17:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-10  2:08 bash script problem Daniel Peter Cavanagh
2002-12-10 16:55 ` ichi
2002-12-10 21:19   ` Chuck Gelm
2002-12-10 17:07 ` Brian Jackson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021210170730.25546.qmail@escalade.vistahp.com \
    --to=brian-kernel-list@mdrx.com \
    --cc=linux-newbie@vger.kernel.org \
    --cc=nofsk@vtown.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox