![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Get Day of Week from date | vpapaiya | HP-UX | 5 | 03-07-2008 01:47 PM |
| week number | alisevA3 | UNIX for Dummies Questions & Answers | 2 | 10-31-2007 02:01 AM |
| Every week one dir - How to | redlotus72 | UNIX for Dummies Questions & Answers | 1 | 10-17-2006 12:54 AM |
| Changing First Day Of The Week? | fowlerleftfoot | UNIX for Dummies Questions & Answers | 2 | 08-28-2006 07:16 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
How to identify week-1 and week-2
Hello Friends
I have three dirs 1. /home/main-bkup 2. /home/bkup-week1 3. /home/bkup-week2 Now we copy backups in 1 initially, then on 1st week we copy few content of 1 into 2 and then run some scripts on that. Then in 2nd week we keep 2 untouched and do the same thing in 3. So I need to identify the way in my script to tell the script which shound be considered as week1 and which is week2. For simplicity say if this week (week of FEB 12 to FEB 18) is 1st week then next week (week of FEB 19 to FEB 25) will be week2. And after that week 1 will come back again, and so on ... Now how should I tell the script to identify which is week 1 and week 2 and then week 1 again, so on ... Ideas please ... Thanks a lot to all in advance C Saha |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
KISS
what about, Code:
rm week3 mv week2 week3 mv week1 week2 backup > week1 |
|||
| Google The UNIX and Linux Forums |