Very new to ubuntu here, and I have been assigned to create the prarg bash shell script below. Please bear with me I am trying to be very clear by providing all relevant examples.
1. Modify the prargs program to precede each argument by its number. Thus, typing
prargs a 'b c' d should give the following output:
1: a 2: b c 3: d
The issue I'm having is the book example runs the following script by typing in "prargs a b c". When I type this I get the error:
prargs:command not found. How do I get the script to run this way? The only way I can run the script is with
while [ "$#" -ne 0 ] do echo "$1" shift done
Because I can't run it as directed, I am stuck. The directions and the book were very unclear, I can find snippets online but the main issue here is syntax for the entire code and I can't find that.
Help? and Thank you!