How do I execute my file so it does one of 2 algorithms? such as ./file SPN??

Hi

I completed a project for school where we had to do cpu scheduling by reading in a file processes.txt and then doing 2 algorithms on it and printing out the order in which processes execute (current time to current process executing) and then doing some calculations (turn around time, etc.).

This is the part that confuses me:

your program should allow you to specify the abbreviation of the algorithm you wish to execute on the command line (see below for abbreviations).

I have one big file that does both of my algorithms at once and prints out their results one after the other. If I wanted to have it so my script executes one or the other, how do I go about this? for instance ./file SPN (to execute shortest process next algorithm) how would I do this? My entire code for both was written into the END{} portion in awk. Would I have to modify the entire thing?

pls keep in mind im still a newbie at this

Pls help!

Search on the internet for positional parameters and learn how to use them in a shell script.

Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.