how to list the files using File Descriptors
hello,
I have written a script named listall.sh with the following codes init.
#!/bin/bash
PATH="/proj/cmon/$1"
echo $PATH
if [ $# != 1 ]; then
echo "Usage: $0 ***"
exit 1
else
ls -l $PATH/*.sc
fi
Here there are 3 subdirectories (namely - src, data and jobs)under /proj/cmon, so if give something like "listall.sh src", it should list all the files in path "/proj/cmon/src", but I was getting listall.sh: line 8: ls: command not found. somebody please help me.
|