![]() |
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 |
| Compare 2 files and output result in pop up window | hongsh | UNIX for Dummies Questions & Answers | 2 | 05-23-2008 10:50 AM |
| awk to output cmd result | IMTheNachoMan | HP-UX | 4 | 04-27-2008 10:41 AM |
| Need to Output result to a non-delimitted file | cosec | Shell Programming and Scripting | 1 | 04-07-2008 05:51 AM |
| Outputting formatted Result log file from old 30000 lines result log<help required> | vikas.iet | Shell Programming and Scripting | 5 | 12-02-2007 10:43 PM |
| any possible to run sql result and output to file | happyv | Shell Programming and Scripting | 7 | 03-02-2007 01:07 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
output result (period -1)
hello,
I have the following basic script which input the period, but I would like to output is period -1.. how? echo Please input period (yyyymm): read PERIOD OUTPUT=$PERIOD -1 echo " you request period -1 is $OUT" input 200705 output 200704 input 200701 output 200612 The above script is not work. Please advise. Thx! |
|
|||||
|
Search this forum, this problem has been answered many times.
Read this thread Getting yesterday DATE Read this FAQ Yesterdays Date/Date Arithmetic Read this TIP Simple date and time calulation in BASH Jean-Pierre. |
|
||||
|
Quote:
I didn't read your requirement properly. My solution wont work for all the situations. Try Ygor's solution. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|