![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Cron to run first day of month to calculate date 3 months ago | new2ss | Shell Programming and Scripting | 1 | 05-17-2007 03:28 AM |
| Subtract date & time in diferent rows | vanand420 | UNIX for Dummies Questions & Answers | 1 | 07-10-2005 09:07 AM |
| Subtract two date in unix | vanand | Shell Programming and Scripting | 1 | 06-18-2005 08:19 AM |
| Subtracting Two months from date | jwatson12 | UNIX for Dummies Questions & Answers | 3 | 09-13-2002 02:06 PM |
| How to subtract 2 hours from 'date' in shell ( /bin/sh ) script ? | yairon | UNIX for Dummies Questions & Answers | 1 | 06-07-2001 04:23 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
I have the script which appends month and year to the name of the
file. Now every time when I append the month-year combination I have to subtract 2 months from the current date and then append it, since we are sending our vendor 2 months prior worth of data eveytime. #! /usr/bin/ksh filefullname=$1 filename=${filefullname%.*} fileext=${filefullname##*.} DATE=`date +%m%y` newfilename="${filename}${DATE}.${fileext}" mv $filefullname $newfilename I am not sure how to go about it, Any help or sample script would help me get going... Thanks.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|