When I try to run my script(check.sh ) I get the following message:
./check.sh[3]: test: argument expected
What does the above message mean ? I have used the arguments while trying to run this.Following is the contents of the script:
1 #! /usr/bin/ksh
2
3 while [ "$1" != ""] ;
4 do
5 echo "Enter the name of the directory :"
6 read dirname
7 ls $dirname
8
9 echo "Press a key ..."
10 read
11 exit 0
12 done ;
13
14
./check.sh[3]: test: argument expected
What does the above message mean ? I have used the arguments while trying to run this.Following is the contents of the script:
1 #! /usr/bin/ksh
2
3 while [ "$1" != ""] ;
4 do
5 echo "Enter the name of the directory :"
6 read dirname
7 ls $dirname
8
9 echo "Press a key ..."
10 read
11 exit 0
12 done ;
13
14
Comment