[ILUG] pdf document info, ls date format and awk commands

Declan Grady Declan.Grady at nuvotem.com
Tue Jan 15 13:50:47 GMT 2002


I have a list of folder full of pdf files, of which I regularly create a
html list of name, date and size. - after a bit of fiddling, this awk
command seems to work

ls -l | awk '{print "<a
href=\"http://www.nuvotem.com/en/products/pdf/"$9"\">"$9"</a>","<br>Date:
"$7"-"$6"-"$8,"<br>Size: "$5" bytes \n\n\n<br><br>"}'
>>/home/declan/pdflist.html

This gives me an output like so : (full list at
http://www.nuvotem.com/pdflist.html )

<a href="http://www.nuvotem.com/en/products/pdf/AC1005.pdf">AC1005.pdf</a>
<br>Date: 11-Jan-14:10 <br>Size: 55595 bytes <br><br>
<a href="http://www.nuvotem.com/en/products/pdf/AC1010.pdf">AC1010.pdf</a>
<br>Date: 11-Jan-14:10 <br>Size: 52907 bytes <br><br>
.... etc etc

3 questions:
1. How can I get the date format to show 11-Jan-2002 instead of 11-Jan-14:10
?
2. How can I *easily* get the "description" from the pdf "document info"
from each pdf file ?
3. How *should* I have gone about achieving this, considering I'm no
programmer ?

Thanks,
Declan
[NODIS]






More information about the ILUG mailing list