I need to implement something like this.
1) search for a file(say *.doc) from a path (say /home/user/temp)
2) if file found & if file size > 0 : yes --> file valid
else : print file not valid.
I am trying to implement something like this, but seems i am terribly wrong somewhere..
PLZ help.
#!/bin/csh -f
if (-e /home/user/temp/*.doc) then
echo file found
size = `ls /home/user/temp/*.doc -l | awk '{print $5}'`
if (size > 10) then
echo file valid
else
echo file invalid
endif
endif