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
There are a number of ways to solve this, but here's a quick solution:
count=1
while [ "$#" -ne 0 ]
do
echo "${count}: $1"
shift
count=$(( $count + 1 ))
done
You might also like to view...
You can create a hyperlink that links to an e-mail address
Indicate whether the statement is true or false
Which alignment option positions the right edge of a line of text against the right margin?
A) Left B) Center C) Right D) Justify
Which of the following is an example of a Level 2 incident?
A. Malware detected on multiple systems B. User's excessive use of bandwidth and resources C. Compromise of any company web site or company presence D. Compromise or suspected compromise of protected customer information
The bookmark feature is located on this tab
A. Home B. Insert C. Layout D. Review