Skip to main content
added 2 characters in body
Source Link

if you want to use youran if clause, tryevaluate the count:

if [ ! -z(( `ls *.txt 2> /dev/null`null|wc ];then-l` ));then...

if you want to use your if clause, try:

if [ ! -z `ls *.txt 2> /dev/null` ];then ...

if you want to use an if clause, evaluate the count:

if (( `ls *.txt 2> /dev/null|wc -l` ));then...
Post Undeleted by Rusty75
Post Deleted by Rusty75
Source Link

if you want to use your if clause, try:

if [ ! -z `ls *.txt 2> /dev/null` ];then ...