Setting date variable



Without setting multiple (crude) variables, I haven't come up with a good & simple way to set the date variable in my "csh" shell script to grab a file when the month rolls over.

Like this:

The file I want to copy into another script is in this format that I cannot change:

"2006-September.txt"
..
..which will roll next month to "2006-October.txt", etc.

I could use the "date" command to do: 2006-09.txt or maybe 2006-Sep.txt
but I haven't found a simple way to set a variable make date spell out the whole name of the month to match the file name.

Any tips on this one?

Best to all,
Jack

_________________________________________________________________
Call friends with PC-to-PC calling -- FREE http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline

_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • translating csh to bash
    ... I need to change my shell script from csh to bash (I need to source a ... bash script), and i need help with one portion. ... Here;s the csh code: ...
    (comp.os.linux.misc)
  • Re: translating csh to bash
    ... I need to change my shell script from csh to bash (I need to source a ... bash script), and i need help with one portion. ... Here;s the csh code: ... echo completed $file ...
    (comp.os.linux.misc)
  • Re: shell script help
    ... I'm trying to write a shell script that will look into a syslog file ... and grab everything that has been logged in the last 5 minutes. ... tmin=`expr $tmin + $minute` ...
    (comp.os.linux.misc)
  • Re: Simple Unix Shell Script
    ... > I am trying to execute a simple shell script to set the environment ... I don't know what is wrong with the shell script. ... its parent process. ... Scripting in csh is not ...
    (comp.unix.programmer)
  • Re: help for a newbie to c shell setting a variable from echo output
    ... On 2007-07-31, DalUK wrote: ... i have been stuck for over a day now on this one bit and i hope ... i have a c shell script and basically i want to get the following ... Csh is not recommended for scripting. ...
    (comp.unix.shell)