[CentOS] Bash Script help...

Fri May 8 08:25:26 UTC 2009
Luciano Miguel Ferreira Rocha <strange at nsk.no-ip.org>

On Thu, May 07, 2009 at 10:12:59PM -0700, Jason Todd Slack-Moehrle wrote:
> Hi All,
> 
> I need to write a script that I will manually start (or a cron job in  
> future) but I need it to do a number of things in order one after  
> another.  How do i do that so everything gets dont as the steps depend  
> on each other.

In the script, before any command, add the line:
  set -e

That'll cause the shell to abort if a command fails.

-- 
lfr
0/0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20090508/ade24481/attachment-0005.sig>