Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

$ 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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions