<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>...I forgot to include the exit logic (Plus, this is a cleaner format):<br><br><code><br><br>#!/bin/bash<br><br>if [ -e filename ];<br>then<br> echo "Exiting Program"<br> exit<br>fi<br>echo "Continue Program"<br><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"></code><br><br>-Dan<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Daniel Magnuszewski <dmagnuszewski@yahoo.com><br>To: nflug@nflug.org<br>Sent: Monday, July 7, 2008 9:46:35 PM<br>Subject: Re: [nflug] bash scripting question<br><br>
<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>if [ -e filename ]; then echo "exists"; fi<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: arial,helvetica,sans-serif; font-size: 13px;">----- Original Message ----<br>From: Robert Wolfe <robert@muzzlethem.com><br>To: nflug@nflug.org<br>Sent: Monday, July 7, 2008 9:29:06 PM<br>Subject: [nflug] bash scripting question<br><br>
For the following script:<br><br>if test -e $a/$b; then printf "exists"; fi<br><br>If the condition is true, then I want the script to exit and not continue <br>to run. What command would I use and where would I put it in this <br>statement?<br>_______________________________________________<br>nflug mailing list<br><a rel="nofollow" ymailto="mailto:nflug@nflug.org" target="_blank" href="mailto:nflug@nflug.org">nflug@nflug.org</a><br><a rel="nofollow" target="_blank" href="http://www.nflug.org/mailman/listinfo/nflug">http://www.nflug.org/mailman/listinfo/nflug</a><br></div></div></div></div></div></div></body></html>