The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-27-2009
Jayaram.Nambura Jayaram.Nambura is offline
Registered User
  
 

Join Date: May 2009
Posts: 2
deleting files inside shell script - ( using find)

Hi,
I am using the command find /apps/qualdb/gpcn/scripts/cab_outbound/archive -name 'z*' -mtime +28 -exec rm {} \;
in unix command prompt
for deleting the files in my unix system under the specfied folder. It was succesfull.

But when i running this command inside a shell script name test.sh it is giving an error message like find: missing argument to `-exec'

Why this is happening the same code when running in command prompt it is success bu running inside shell script it fails..

Thanks for your help