CSC128: Introduction to Linux

sed Lab


1. Write a sed script that changes the file
in this web site download it first over the web so that it is complete, using the wget utility. I use Server Side Includes so the web server is putting the file together we will go over that soon when you make a web page.

Your sed script will change the following: Run man wget to see how to use wget.
These get both the outline and the cascading stylesheet.
Note: There is embedded html in there so you need to look at the source to figure out what regex to use and you need to replace the html tags.

  • Changes my first name to your name, regardless of whether or not it is Sean or sean,
  • Changes my last name to your last name, (Mauney or mauney)
  • Changes "smauney at" to your e-mail address
  • Changes "smauney" to your NetID
  • Gets rid of the string 'CSC128: Outline Spring 17' and places '[Your Name]' in there
  • changes 'Links, Reading, Class Overview:' to 'Assignments this week:'
  • gets rid of all of the bold tags <b> and </b> and their associated brackets
  • Writes out another file automatically called donefile.html into the current directory.
Classroom and Online Sections:
I will correct this in class for the classroom section both sections be sure that the file is viewable by me and is in your bin and named [username]_mywebpage.sed, I will run it on my outline.shtml. Be sure to run it and output it somewhere into your public_html so that you can see if all the formatting worked by looking at the file through the web.

Place your sedscript in a file named ~/bin/[username]_mywebpage.sed . I will get it from there and correct it and view your donefile.html web page.