I have a bash script mystuff
containing a line like
lynx -dump http://example.com >tmpfile
and the script works fine, including this part, except when I run it non-interactively:
$ ./mystuff &
[1] 3712
$ jobs
[1]+ Stopped
The job is stopped. I find that lynx is the culprit. Even running this command directly from the bash prompt causes the job to be stopped immediately:
$ lynx -dump http://example.com >tmpfile &
[1] 1836
$ jobs
[1]+ Stopped
Why won't lynx run in the background? How can I fix this?
EDIT:
I am using lynx because I don't want to have to parse the raw HTML. The difference between wget
and lynx -dump
is that lynx will render the HTML; it will hide all the tags, arrange text nicely, etc.