-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 At some point hitherto, Thomas M. Albright hath spake thusly: > > What's with the 'let' keyword? > > it's the only way i know to add to variables: > today=`date +%j` > let tomorrow=$today+1
If you need your scripts to be portable, the normal way to do this is to use the expr command: today=`date +%j` tomorrow=`expr $today + 1` As this works on the Bourne, Korn, and Bourne Again shells, I personally always use this construct. It's true that bash and ksh have constructs that work _much_ more efficiently (like Ben's $(($today + 1)) ) but this version works on every bourne-derivative shell. > I know just a little bit about scripting in (t)csh. Anyone have the ol' "scripting in csh is evil" link handy? :) - -- Derek Martin [EMAIL PROTECTED] - --------------------------------------------- I prefer mail encrypted with PGP/GPG! GnuPG Key ID: 0x81CFE75D Retrieve my public key at http://pgp.mit.edu Learn more about it at http://www.gnupg.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE8wOTndjdlQoHP510RAq3BAJ9bGYu7TWwQtrT7iHfBjGSS5N+BPgCeIGgg dxXcnoEjpgZGKT52o3zqRDQ= =TdQI -----END PGP SIGNATURE----- ***************************************************************** To unsubscribe from this list, send mail to [EMAIL PROTECTED] with the text 'unsubscribe gnhlug' in the message body. *****************************************************************
