Hi I am new in shell,
I am trying to create a small script that can do exit if a script is executed when argument not 2
#!/bin/sh
if [ $# -gt 2]; then
echo greater
exit 1;
elif [ $# -le]; then
echo less
exit 1;
fi
it keeps returning me
[: 10: missing ]
[: 10: missing ]
whatever number of argument I specify..
Can anyone point out?
Thank you