MYSCRIPTS IN LINUX/UNIX/UBUNTU
LINUX SCRIPT TO PRINT REVERSE ORDER OF ARGUMENTS
1) SCRIPT TO PRINT REVERSE ORDER OF ARGUMENTS
#!/bash/sh
if [ $# -eq 0 ]
then
echo "there is no argument"
else echo $* > a1.sh
i=$#
while [ $i -ne 0 ]
do
echo `cut -d " " -f $i a1.sh`
i=`expr $i - 1`
done>a2.sh
tr '\n' ' ' < a2.sh
fi
echo
Newer Post
Home