![]() |
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 |
| Korn Shell script not running | Asty | Shell Programming and Scripting | 1 | 08-11-2006 01:17 PM |
| Help with Korn Shell script | heprox | AIX | 1 | 12-19-2005 02:04 PM |
| korn shell script | pavan_test | UNIX Desktop for Dummies Questions & Answers | 3 | 10-27-2005 12:09 PM |
| korn shell script | pavan_test | UNIX for Dummies Questions & Answers | 1 | 10-26-2005 01:17 PM |
| Yesterdays Date/Date Arithmetic | Perderabo | Answers to Frequently Asked Questions | 0 | 04-26-2004 05:04 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Korn Shell Script - Getting yesterdays date
I need to get yesterdays date in the format yyyymmdd
I can get today's date simply enough - 20031112 Is there any way to substract 1 from this easily enough in korn shell script? It has to be korn shell and not perl |
|
|||||
|
Quote:
Here is a script that can do date calculations without the use of external programs. |
|
||||
|
Hi- Thanks - to be honest I hadnt thought of the first of the month
I am using your script as follows: ./datecalc -a 2003 11 12 - 1 and it returns 2003 11 11 Is there a way that it can return the value without the spaces? |
|
|||||
|
Quote:
|
|
||||
|
# ./datecalc -a 2003 11 12 - 1 | read y m d ; echo ${y}${m}${d}
y: Undefined variable any ideas? |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| shell script, shell scripting, unix scripting, unix scripting basics |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|