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 [EMAIL PROTECTED]
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 [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.linux-learn.org/faqs
