I wrote a shell script to convert HTML source to plain text using lynx.
Here it is:
#!/bin/sh
if [ -f = "/usr/bin/lynx" ]
then
if [ -f = "$1" ]
then
lynx -dump $1 > $2
else
echo "File $1 does not exist!"
fi
else
echo "Lynx is not installed!"
fi
Now, although lynx exists in the right directory, and I pass correct arguments I get either "Lyns is not installed!" message or (if I comment the first test) "File $1 does not exist!". I'm not to good at sh so could someone tell me what is wrong with the script?