I only need to execute a shell script IF there are some zip files in my target directory
So I begin with
if `test -r tempdata/*.zip`
then
BUT sometimes get TOO MANY ARGUMENTS for test
So I try
if `ls tempdata/*.zip | wc -l` > 0
then
BUT this fails if there are NO zip files in my directory
There must be an easy way
Someone help a Unix newbie ?
So I begin with
if `test -r tempdata/*.zip`
then
BUT sometimes get TOO MANY ARGUMENTS for test
So I try
if `ls tempdata/*.zip | wc -l` > 0
then
BUT this fails if there are NO zip files in my directory
There must be an easy way
Someone help a Unix newbie ?