The first thing you should do is write and debug a suite of test cases that will define the scope of your project. The project will be complete when your simulator passes all the tests. Start with the sed manpage. Write at least one test for every feature that you are required to implement. Without this step, you will probably never finish the project and will not know it if you do. Fully executable tests are desirable and will save you time in the long run, but are not necessary. Your first real task is to parse the command line. Choose a module. You do not want to do this yourself. The last thing to do is implement the sed commands. Add them one at a time. Test them with the test you already made. Repeat all the test frequently to make sure that you have not broken something that had been working. Good Luck, Bill

Sure, we can help, but we're not gonna do your assignment in your place.

Please show what you have done and where you're having difficulties, we will help you.

If you haven't got anything so far, this is a starter:

Code

sed 's/MA/Massachussetts/' file.txt

will print to the screen a version of file.txt where occurrences of MA have been replaced by the full state name.

Same thing in Perl:

Code

perl -pe 's/MA/Massachussetts/' file.txt

As you can see, it is very similar, but of course, it will not always be that easy. Actually, a Perl one-liner will not be sufficient, you will have to write an actual Perl program. But the Perl s/// substitution operator will definitely have to be used heavily in your progtram.