LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > peonuser
User Name
Password

Notices


Old

File listing to html

Posted 11-01-2014 at 01:55 PM by peonuser
Updated 11-20-2014 at 09:55 AM by peonuser

Downlloaded some pdf files, but wanted to access them from the local server. Did not want to edit several hundred lines into an html file so I create a batch file. Then the job was done in seconds rather than hours. Learned a bit more about sed in the process.

# turn a pdf list into a usable http file for a web server.
ls *.pdf > pdflist
cut -d "." -f1 pdflist > descripts
sed -i -e 's/^/<a href=\"/' pdflist
sed -i 's/$/\"\>/'...
Member
Posted in Uncategorized
Views 1402 Comments 0 peonuser is offline

  



All times are GMT -5. The time now is 02:39 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration