[H-GEN] Useful not so obvious tips

Adrian Sutton adrian at intencha.com
Tue Oct 26 21:14:06 EDT 2004


The most useful thing I've ever discovered on UNIX systems is &&.  
Mostly I use it as:

javac Test.java && java Test

which compiles the code and then runs it but if the compile fails the 
code isn't run.  Also useful is:

/Library/Tomcat/bin/shutdown.sh && /Library/Tomcat/bin/startup.sh

since Tomcat doesn't provide a restart script.  There's plenty of other 
occasions where you want to perform two or more commands one after the 
other.  The one downside I've hit was yesterday I accidently typed:

rm -rf /Library/Tomcat/webapps/JSPWiki /Library/Tomcat/bin/shutdown.sh 
&& /Library/Tomcat/bin/startup.sh

and had to restroe shutdown.sh from backup.

Regards,

Adrian Sutton.
----------------------------------------------
Intencha "tomorrow's technology today"
Ph: 3420 4584 0422236329
35 Prenzler St
Upper Mount Gravatt 4122
Australia QLD
www.intencha.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://lists.humbug.org.au/pipermail/general/attachments/20041027/2c8bb87f/attachment.sig>


More information about the General mailing list