Script: Removing HTML tags and duplicate lines

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

  1. The problem statement, all variables and given/known data:
    You will write a script that will remove all HTML tags from an HTML document and remove any consecutive duplicate lines, and save it as a text document. The user should have the option of including the name of an html file as an argument for the script, but if none is provided, then the script should prompt the user for the file name.

Something is wrong with this script I just can't figure out what it is. It says it can't find the file yet it exists. I also have no clue how to direct the updated file to a new text document properly.

  1. Relevant commands, code, scripts, algorithms:

  2. The attempts at a solution (include all code and scripts):

cd ~
read -p "What file would you like to clean? " html

if [ -f $html ]
then
sed 's/<[^>]*>//g' $html | uniq > syllabus.html.txt
else
echo "File does not exist."
fi

  1. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
    Jackson Community College, Jackson MI, USA, M. Brinkman, CIS106

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).

The script seems fine to me. Try running it with -x option, as in: sh -x scriptname

The only problem with that is the instructor is going to be running his own set of commands to grade the script (which he gave us), and it does not include the -x option.

Update:
When running the script and typing in the file to be cleaned, in this case syllabus.html, I press enter and it goes to the next blank line, and uniq displays on the top of the window bar. The new file syllabus.html.txt does get created, but nothing gets put into the file.

Why do you think uniq displays at the top of the windows bar?