KEMBAR78
Shell Programming Concept | PPTX
$1 The first argument
$2 Second argument
$0 The name of the script
$# The number of argument
$* The complete set of positional parameters as single string.
-eq Equal to
-ne Not equal to
-gt GreaterThan
-ge Greater than equal to
-lt Less than
-le Less than equal to
$ x=5; y=7;
$ test $x –eq $y; echo $?
1 Not equal
if test $# -ne 3; then
echo “You didn’t enter three arguments
else
echo “You entered correctly”
fi
Shell Programming Concept
Shell Programming Concept
Shell Programming Concept

Shell Programming Concept

  • 7.
    $1 The firstargument $2 Second argument $0 The name of the script $# The number of argument $* The complete set of positional parameters as single string.
  • 10.
    -eq Equal to -neNot equal to -gt GreaterThan -ge Greater than equal to -lt Less than -le Less than equal to $ x=5; y=7; $ test $x –eq $y; echo $? 1 Not equal if test $# -ne 3; then echo “You didn’t enter three arguments else echo “You entered correctly” fi