bash question
John Abreau
jabr at blu.org
Mon Sep 23 18:15:37 EDT 2002
"Thomas M. Albright" <talbright at tarogue.net> writes:
> If the due date is greater than today, it outputs the message "Due in x
> days." If the due date is less than today I get a message saying "You
> are -x days past due." How can I convert the negative number into a
> positive one in bash?
$ echo $[ 0 - -1 ]
1
--
John Abreau / Executive Director, Boston Linux & Unix
IM: jabr at jabber.blu.org / abreauj at aim / abreauj at yahoo / 28611923 at icq
Email jabr at blu.org / WWW http://www.abreau.net / PGP-Key-ID 0xD5C7B5D9
PGP-Key-Fingerprint 72 FB 39 4F 3C 3B D6 5B E0 C8 5A 6E F1 2C BE 99
Some people say, "The enemy of my enemy is my friend."
I often respond, "When elephants fight, it's the grass
that gets trampled."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 344 bytes
Desc: not available
Url : http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20020923/eeaca73f/attachment.bin
More information about the gnhlug-discuss
mailing list