Question: Write a shell script websh which uses lynx dump to output a web page, then in a loop lets you type a reference number to

Write a shell script "websh" which uses "lynx dump" to output a web page, then in a loop lets you type a "reference number" to go to a URL linked to from that page. "websh" has one mandatory command-line argument which is the URL.

You exit "websh" by sending end-of-file, which in the terminal you can do by pressing control-D by default. It will also work non-interactively with its standard input redirected from a file. Therefore your main loop will look something like "while read sel" (or whatever variable name you choose instead of "sel").

Note how "lynx dump" lists the URLs of the page's links at the bottom. When the user makes a selection, you can do "lynx dump $url" again with a grep to extract the appropriate new URL.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!