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

What is the syntax of "nested if statement" in shell scripting?

635


What is web script?

586


What is meant by $1 in shell script?

552


Explain about sourcing commands?

640


How will you pass and access arguments to a script in linux?

590






Hello all, This is my assignment on shell scripting, can anyone help me regarding this ? Create a shell script which connects to the database In second shell script include the first script for the DB connection Create a table (PRADEEP_DATA) with 2 columns (name, value) In Third shell script include the first script for the DB connection And insert/delete the values from the Table, by accepting input from the user This functionality should be a menu driven Program: 1) Insert to the database a. Name b. value 2)Delete from the database a.Name b.value Exception handling needs to be taken care.

1857


What is shell company all about?

576


What is shell scripting?

595


What is a program shell?

572


What is console line?

573


What is the first line of a shell script called?

575


Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.

2035


What is shell environment?

548


What does it mean to debug a script?

575


How important is shell scripting?

548