[lug] Scripting help, lynx

Paul Nowosielski paulnowosielski at yahoo.com
Tue May 3 06:58:29 MDT 2011


Dear All,

I'm trying to convert all the html files
into text using lynx. The files are in many directories
with meaningful names.

Can anyone assist me in creating a script
That will go through each directory recursively
and convert the files to text and preserve the base name.

ex: file1.html file1.txt file2.html file2.txt (or something close to this)

I have this so far, which correctly traverse the directories
and spits out the text. But I am not understanding out how
to direct to a txt file with the same name as the html file.

find ./ -name *.html |xargs -I '{}' lynx -nolist -dump '{}'

Any thoughts?

Thank you,

Paul



More information about the LUG mailing list