Question : crontab -e, errors

I have a cronjob to run the below script and found error in log file.
syntax error at line 3: `$' unexpected

Can you help me what the problem is?

----------------------------------------------------------------
#/bin/sh
for alphascript in A B C
do
   for fullval in $(find /home/alphadata -type f -name "$alphascript*")
   do
     
     echo "lucky: " $fullval ;
        
   done
done

Answer : crontab -e, errors

for fullval in `find /home/alphadata -type f -name "$alphascript*"`

try that, or does the ` execute the line in another instance?


might use grep or awk for the job (awk would work, sadly i dont have my linux box at the house and cant whip up the code for you free hand style)

Random Solutions  
 
programming4us programming4us