
Originally Posted by
roshanjose
I have 2 GB of html files and i need to convert all of them at once to text files. Is there any way that I can do it. Converting each of them manually is really a pain and I want to convert all of them with a single command to text files.
Can anyone help
You might try running lynx inside a shell script, maybe something like:
Code:
#!/bin/sh
if [ ! -d text ]; then
echo "Creating text subdir."
mkdir text
fi
for file in *.html
do
FNAME=`echo $file | cut -d . -f 1`
lynx -dump $file >text/$FNAME.txt
done
(This would dump the converted files into a "text" subdirectory.)
Bookmarks