![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Use 'date' in a script | TexasGuy | Shell Programming and Scripting | 3 | 07-15-2008 04:19 AM |
| Date calculation script | vish_indian | Shell Programming and Scripting | 18 | 04-24-2008 07:31 PM |
| awk script for date conversion | charandevu | Shell Programming and Scripting | 2 | 04-08-2008 05:07 AM |
| Conditional Date Script | cpd259 | Shell Programming and Scripting | 2 | 06-21-2007 01:01 PM |
| Specify a previous date as start date in shell script | ritzwan0 | Shell Programming and Scripting | 2 | 09-25-2006 05:58 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
get tommorows' date from script and use in other script
Hi
I have a script that returns tommorows date in mm/dd/yy format.I want the date returnred by that script to be used by another script that executes some sql statements. What i dont know is how to get the result returned from the script and use it as input for the other script that executes sql and takes the date as an input parameter. My date script is like this: #!/usr/bin/ksh date '+%y %m %d' | { read YEAR MONTH DAY DAY=`expr "$DAY" + 1` case "$DAY" in 0) MONTH=`expr "$MONTH" + 1` case "$MONTH" in 0) MONTH=12 YEAR=`expr "$YEAR" + 1` ;; esac DAY=`cal $MONTH $YEAR | grep . | fmt +1 | tail +1` esac echo"$MONTH/$DAY/$YEAR" } Thanx in advance |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|