CSCI 157: UNIX Power Utilities and Shell Programming
Laboratory Assignment 9
1. TURN-IN a hard copy of the following:
- On all homework please include
- Your Name
- Course Number
- Date
- ecst login name
- No questions from the book this lab
- These days it seems that a lot of things that were once done with "power tools" are now just done with perl.
- The purpose of this assignment is to get introduced to PERL
- TURN-IN printout of script
- Have a soft copy on your ecst account so you can demo it
Pretty Print Script
- This script is exactly like a 15B assignment I once did except in perl.
- The program logic is easy to write and understand, figuring out how to do it in perl is the point of this assignment
- For those that are already proficient in perl this should
be a piece of cake. I suggest adding requirements to make it more
interesting if this is the case.
- This script takes an input file and then generates an output file.
- The input file is a poorly indented .cpp file and the output file should be the same .cpp file except nicely indented.
- My 15B assignment is provided here and in ~toddj/public_html/157/lab9/
- Included is an executable that can give an example of desired output on any file.
- Looking at the example input file and output file should make this assignment pretty clear.
- The indentation is much nicer.
- You will also notice that there is still plenty of room for improvement.
- You may actually come accross code that is not indented in
which case this script might actually come in handy. I did not
believe that anyone would ever do such an evil thing like not indent
their code until I came across it in code I had to maintain.
- Resources