Search Results

Search: Posts Made By: Don Cragun
2,584
Posted By Don Cragun
If the ksh being used is a recent version (such...
If the ksh being used is a recent version (such as 93u+ 2012-08-01), you could also use:
filename="$(printf '%s_%(+%Y%j)T.ZIP' "$FILE_NAME_WO_EXTN" yesterday)"
2,584
Posted By Don Cragun
Maybe something more like: #!/bin/ksh ...
Maybe something more like:
#!/bin/ksh
FILE_NAME_WO_EXTN="whatever"
YrDoy=`date '+%Y%j'`
filename="${FILE_NAME_WO_EXTN}_$((YrDoy - 1)).ZIP"
printf 'filename has been set to "%s"\n' "$filename"
...
2,584
Posted By Don Cragun
I believe that the output of that script would...
I believe that the output of that script would always be:
doy
and never:
36
If you change:
echo doyto:
printf '%03d\n' $doy
you should get something closer to what you want.
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 01:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy