write a non recursive shell script that accepts any number
of arguments and prints them in the reverse order

Answer Posted / naresh babu

echo "no of arguments:$#"
echo "arguments in reverse order:"
for i in $*
do
j=$i" "$j
done
echo $j

Is This Answer Correct ?    26 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Set up a Sev 2 alert when the Primary WA service fails. A windows batch script needs to be created that will monitor the WA service on the Primary and when the service stops/fails a Sev 2 TT is generated for a particular team ?

1707


What does $@ mean bash?

659


How will you find the 99th line of a file using only tail and head command?

1968


What does $0 mean in shell script?

549


How will you print the login names of all users on a system?

564






What are the different variables present in linux shell?

603


Where are cowrie shells found?

567


How do I run a script from command prompt?

556


Explain about shebang?

614


Is shell a part of kernel?

548


Why are there shells on the beach?

581


what is tickets $ what low,medium,high priorite pls define time also

1713


How will you connect to a database server from linux?

549


How do I edit a .sh file?

613


How can you get the value of pi till a 100 decimal places?

539