Tuesday, April 26, 2011

Bash Scripting Homework - Extra Credit

This assignment is for extra credit and due by Friday, April 29th at 5:00 pm 10:00 am.  (Correction for when grades are due)

Write a bash script to correct typos in file names.  It should take two arguments - the first is the typo and the second is the correction.  It should replace all instances of the typo with the correction in the file names in the current directory.  If only one argument is supplied, then it should simply delete the typo from the file names.  If either zero or more than two arguments are supplied, the script should output a message alerting the user that the script requires 1 or 2 arguments.

Save this script as bash_extra.sh and email it to the instructor.

Thursday, March 31, 2011

Wednesday, March 16, 2011

sed and awk Homework

Here is the homework over sed and awk, due next class:

Here are two files that you will need to complete the homework: