![]() |
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 |
| How to find a date which is 7 days past when given current date | ladtony | Shell Programming and Scripting | 17 | 04-09-2009 04:06 PM |
| Compare date from db2 table to yesterday's Unix system date | sasaliasim | Shell Programming and Scripting | 9 | 12-01-2008 11:37 PM |
| Perl: Extracting date from file name and comparing with current date | MKNENI | Shell Programming and Scripting | 4 | 03-26-2008 04:01 PM |
| date issue-find prevoius date in a patricular format | bsandeep_80 | UNIX for Advanced & Expert Users | 3 | 11-15-2007 08:42 PM |
| Changing Creation Date to a Prespecified Date of a File In Unix | monkfan | UNIX for Dummies Questions & Answers | 4 | 11-28-2006 07:15 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
It might vary by the system's version of date, but something like the following might work:
Code:
export my_date=$(date +'%w') if [[ $my_date = '0' ]] || [[ $my_date = '6' ]] then ... fi Code:
export my_date=$(date +'%u') if [[ $my_date = '6' ]] || [[ $my_date = '7' ]] then ... fi |
|
||||
|
Thanks Curelb and cfajohnson.
I got Curleb things to work. but cfa ur code doesnot work. Last edited by RubinPat; 03-19-2009 at 03:45 PM.. |
| Sponsored Links | ||
|
|