tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: ksh math
@ 2004-06-30 20:29 Cohen, Andy
  0 siblings, 0 replies; only message in thread
From: Cohen, Andy @ 2004-06-30 20:29 UTC (permalink / raw)


A fairly simple solution - one that I thought I had tried but obviously not.


This is what I chose to use:

	export PREV_RUN_DATE=$(( $RUN_DATE - 1 ))



This also worked:

	let PREV_RUN_DATE=$RUN_DATE-1


Thanks to Charlie Ballowe, Bob Sloane, Mark Scarborough, and Dr. Tom Blinn



ORIGINAL QUESTION
=================
I don't know what I'm missing -- all I want to do is do some very basic math on a variable but I can't figure it out.  I've searched the archives, google, manuals, etc. and can't find anything that clarifies it.

I have a variable $RUN_DAY and I want to subtract one (1) from it.  How do I do that?

I thought it would be:

    export PREV_DAY=${RUN_DAY}-1

but it doesn't work.  I've tried quite a number of variations on this all to no avail.

I'm using:
    Tru64 5.1A
    korn shell (ksh)


Thank you!
Andy Cohen 
Database Systems Administrator 
Cognex Corporation 
1 Vision Drive 
Natick, MA 01760 
508-650-3079 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-06-30 20:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-30 20:29 SUMMARY: ksh math Cohen, Andy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox