hi,
I want to write a basic original csh , not tcsh(since using solaris) to count the no of files in a directory and print whether they are > or = or < than 1
i am new to csh.
Where i am wrong?How to store the result of ls -1 | wc -l in files variable?
Quote:
#!/usr/bin/csh
files= ( ls -1 | wc -l )
if [ $files < 1] then
echo "No of files less than 1"
else if [ $files == 1 ] then
echo "No of files equal to 1"
else if [ $files > 1 ]then
echo "No of files greater than 1"
endif
|
thanks for any response.
regards,
nirmal Tom.