I am trying to find the number of files whose name starts with uni.
Below is the code but it is giving error.
#!/bin/csh
FILES_NAME ='files_list';
FILE_NAME_PATTERN = 'uni*';
NO_OF_FILES;
ls -l $FILE_NAME_PATTERN > $FILES_NAME ;
NO_OF_FILES = `wc -l $FILES_NAME`;
echo $NO_OF_FILES;
When run give the following warnings.
$ ./unix_4.sh
FILES_NAME: Permission denied.
FILE_NAME_PATTERN: Command not found.
NO_OF_FILES: Command not found.
FILE_NAME_PATTERN: Undefined variable.
$
But when the following commands are issued
ls -l uni* > files_list and
wc -l files_list
runs perfectly.
What is the problem