All of lore.kernel.org
 help / color / mirror / Atom feed
* bash script problem
@ 2002-12-10  2:08 Daniel Peter Cavanagh
  2002-12-10 16:55 ` ichi
  2002-12-10 17:07 ` Brian Jackson
  0 siblings, 2 replies; 4+ messages in thread
From: Daniel Peter Cavanagh @ 2002-12-10  2:08 UTC (permalink / raw)
  To: linux-newbie

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-12-10 21:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.