Question: $ cat args_dollar_at # arguments pass in $@ echo Number of arguments passed is $# for arg in $@ do echo $arg done $ ./args_dollar_at

$ cat args_dollar_at # arguments pass in $@ echo Number of arguments passed is $# for arg in "$@" do echo $arg done $ ./args_dollar_at 'a b' c Number of arguments passed is 2 a b c $

****Code for question below

3. Modify the args_dollar_at program on Week 4, part 2 lecture page 5 to precede each argument by its number. So, typing:

./args_dollar_at.sh a 'b c' d should give the following output: 1: a 2: b c 3: d

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!