Jan 13, 2004 #1 CALYAN Programmer Apr 23, 2001 39 US how to reduce one day from this Jan013.gz ---> it should be Jan012.gz thanks
Jan 13, 2004 Thread starter #2 CALYAN Programmer Apr 23, 2001 39 US I used this to extract somepart of the date FILENAME=$(date +%b%d) printf $FILENAME It generates output like this.? Jan13(example) But I need Jan13.gz how to add this? regards s.kalyan Upvote 0 Downvote
I used this to extract somepart of the date FILENAME=$(date +%b%d) printf $FILENAME It generates output like this.? Jan13(example) But I need Jan13.gz how to add this? regards s.kalyan
Jan 13, 2004 1 #3 aigles Technical User Sep 20, 2001 464 FR Try this FILENAME=$(TZ=TZ+23;date +%b%d).gr print $FILENAME Jean Pierre. Upvote 0 Downvote
Jan 13, 2004 #4 aigles Technical User Sep 20, 2001 464 FR The ';' can be omited : FILENAME=$(TZ=TZ+23 date +%b%d).gr print $FILENAME Jean Pierre. Upvote 0 Downvote
Jan 13, 2004 Thread starter #5 CALYAN Programmer Apr 23, 2001 39 US Hi it shows only current date Jan14.gz I want to reduce one day from it. how to do? Upvote 0 Downvote
Jan 13, 2004 #6 aigles Technical User Sep 20, 2001 464 FR The command works fine on my aix box (with ksh): set -vx FILENAME=$(TZ=TZ+23 date +%b%d).gr print $FILENAME FILENAME=$(TZ=TZ+23 date +%b%d).gr + + date +%b%d + TZ=TZ+23 FILENAME=jan13.gr print $FILENAME + print jan13.gr jan13.gr Jean Pierre. Upvote 0 Downvote
The command works fine on my aix box (with ksh): set -vx FILENAME=$(TZ=TZ+23 date +%b%d).gr print $FILENAME FILENAME=$(TZ=TZ+23 date +%b%d).gr + + date +%b%d + TZ=TZ+23 FILENAME=jan13.gr print $FILENAME + print jan13.gr jan13.gr Jean Pierre.
Jan 15, 2004 #7 PHV MIS Nov 8, 2002 53,708 FR Try this: Code: FILENAME=$(date +%b)$(($(date +%d)-1)).gz Hope This Help PH. Upvote 0 Downvote