This Shell Script prints the Command line Arguments passed, along with the name of Script
Program Code:
#!/bin/bash
#This is Program that prints the Arguments Passed along with the name of Script
if [ $# != 2 ]
then
echo " The usage : You must need to passed 3 Arguments"
exit 0
fi
echo " This will print the Arguments you've been passed to this Script : "
echo " The total Number of Arguments you've passed is : $# "
echo " The name of the Script : $0"
echo " The First Argument is : $1"
echo " The Second Argument is : $2"
Program Output:
./filename.sh <FirstCommand> <SecondCommand>
Post a Comment