Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

defining string for date in YYMMDD format

Status
Not open for further replies.

starlite79

Technical User
Aug 15, 2008
89
US
Hi,

I am writing a kshell script to wget a bunch of files that have a nameYYMMDDname.data format. I attempted to define a string for the YYMMDD part as follows using strftime

Code:
# Define a string for the YYMMDD part of the filename.

s=strftime('%y%m%d')

Next I defined the filename as such:

Code:
file="name"$s"data.data"

But the script fails at the strftime part (unexpected '( 'error). Do I need to include C library(ies) somehow? Is there another way to define this? I may just have to say wget *.data, but I was hoping for a more elegant approach.

 
This is the perl forum

------------------------------------------
- Kevin, perl coder unexceptional! [wiggle]
 
My apologies. I had Perl on my mind when I posted this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top