Jun 18, 2002 #1 stu78 Programmer May 29, 2002 121 GB Hi, Does anyone know a command to modify today's date in c shell? Basically I need to find todays date & subtract 4 from it.... Any Ideas? Thanks. Stewart.
Hi, Does anyone know a command to modify today's date in c shell? Basically I need to find todays date & subtract 4 from it.... Any Ideas? Thanks. Stewart.
Jun 18, 2002 #2 tdatgod Programmer Jul 21, 2001 601 US Hi, There is a FAQ about how to find yesterday's date. faq80-953 using this technique you can just change the +24 to +96 and get the date from 4 days ago. Upvote 0 Downvote
Hi, There is a FAQ about how to find yesterday's date. faq80-953 using this technique you can just change the +24 to +96 and get the date from 4 days ago.
Jun 18, 2002 Thread starter #3 stu78 Programmer May 29, 2002 121 GB Thanks tdatgod, However this technique uses the Bourne Shell, I am using the C-Shell. Thanks, Stu. Upvote 0 Downvote
Jun 18, 2002 #4 vgersh99 Programmer Jul 27, 2000 2,146 US XI Commendment: "Thou shall not use C-shell for thy scripting" Upvote 0 Downvote
Jun 19, 2002 #5 tdatgod Programmer Jul 21, 2001 601 US I program CSH as well but I have learned to translate #!/usr/bin/sh TZ="$TZ+24" export TZ day=`date +%m/%d/%y` echo $day ---- #!/bin/csh @ x = $TZ + 24 setenv TZ $x day=`date +%m/%d/%y` echo $day Again change the 24 to 96. ---- Upvote 0 Downvote
I program CSH as well but I have learned to translate #!/usr/bin/sh TZ="$TZ+24" export TZ day=`date +%m/%d/%y` echo $day ---- #!/bin/csh @ x = $TZ + 24 setenv TZ $x day=`date +%m/%d/%y` echo $day Again change the 24 to 96. ----