Closed ghost closed 5 years ago
set nonomatch set list = ( *.txt )
echo $#list $list prints 1 *.txt
it should prints just 0
so you can check if the list is empty
If list has the word *.txt in it then the number of words in list is 1.
list
*.txt
You are looking to do something like this:
ls -1d *.txt | wc -l
set nonomatch set list = ( *.txt )
echo $#list $list prints 1 *.txt
it should prints just 0
so you can check if the list is empty