Write a complete shell script that first asks the user to enter a URL. The script...

90.2K

Verified Solution

Question

Programming

Write a complete shell script that first asks the user to entera URL. The script should read the URL into a variable namedurl.


The shell script should then retrieve the file associated with theURL by using the curl command.

The output of the curl command should beredirected to a file namedhtml_file.

The shell script should then use the grepcommand to search the file named html_file for theword manhattan.


Finally, the shell script should make the file namedhtml_file readable to everyone by issuing theappropriate chmod command to give \"o\" (others)read permission on the file.

Answer & Explanation Solved by verified expert
3.8 Ratings (359 Votes)
Please find the requested script below Also including thescreenshot of sample outputPlease provide your feedbackThanks and Happy learningbinbashAbove line    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students