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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
shell script reqd - deleting files venkatesht Shell Programming and Scripting 2 12-19-2008 01:15 PM
Need script to find errored files inside directories osramos Shell Programming and Scripting 4 09-24-2008 01:13 PM
shell script: deleting files from a directory onlyc Shell Programming and Scripting 1 07-09-2006 06:41 AM
ftp files inside a shell script matrix1067 Shell Programming and Scripting 5 02-07-2006 05:31 PM
shell script to find files naren_samba2005 Shell Programming and Scripting 2 10-21-2005 05:06 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #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
  #2 (permalink)  
Old 05-27-2009
panyam panyam is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2008
Posts: 474
The same working fine for me...inside a shell script.

Check ur script once again ...You might hav missed somethng..
  #3 (permalink)  
Old 05-27-2009
Jayaram.Nambura Jayaram.Nambura is offline
Registered User
  
 

Join Date: May 2009
Posts: 2
Thanks for your help.

I have checked the shell script and it is fine.

I am having a shell script name test.sh
and it contains only one line which is
find /apps/qualdb/gpcn/scripts/cab_outbound/archive -name 'z*' -mtime +28 -exec rm {} \;

and when i am running using ksh test.sh it is showing exception as find: missing argument to `-exec'


the same thing when i am running in command prompt it is working fine.



Is there is any way to attach the file in this forum so that i can attcah the screen shot of whet i am trying.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:29 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0