Enter your email address & Win:

System Software Lab Programs ( UNIX Programs )

// March 3rd, 2009 // Engineering, Unix and System Software Lab // Written by sandeephegde

-->

Subject : System Software Laboratory

Branch : Information Science & Engineering

Semester : 6

University : VTU

………………………………………………………………………………………………………………………….
PART -B

………………………………………………………………………………………………………………………….

1. a) Non-recursive shell script that accepts any number of arguments and prints them in the Reverse order, ( for example, if the script is named rags, then executing rags A B C should produce C B A on the standard output).

……………………………………………………………………………………………………………………………

if [ $# -eq 0]

then

echo -e “No arguments”

else

a=($*)

echo -3 “Arguments are”

echo $*

let x=$#

echo -2 “Arguments in reverse order ”

while [ $x -ne -1]

do

echo -e “${a[$x]}”

let x=x-1

done

fi

[Request : If you are going to post this program on any other website please link back to original post ]


If you enjoyed this post, make sure you subscribe to my RSS feed!

Related posts:

  1. System Software Lab Programs ( UNIX Programs ) – 2a
  2. System Software Lab Programs ( UNIX Programs ) – 4a
  3. System Software Lab Programs ( UNIX Programs ) – 6a
  4. System Software Lab Programs ( UNIX Programs ) – 7a
  5. System Software Lab Programs ( UNIX Programs ) – 1B
blog comments powered by Disqus
Get Adobe Flash playerPlugin by wpburn.com wordpress themes