> can anyone tell me how to read the file modification time (mostly interested
> in the year) into a variable in Korn shell? ls -l gives me only "mm dd" for
> files newer then 6 months old. I need to be able to extract a numeric value,
> so later i could prepend it to a file name.
> Thank you!!!
This is simple with perl. You can get the epoch seconds modification
time into a KSH variable by the command below.
MTIME=$(perl -e 'print $mtime = (stat("filename")), "\n";')
IBM High Speed Interconnect - Fibre Channel I/O Dev/Test/Support
<< Comments, views, and opinions are mine alone, not IBM's. >>