The UNIX and Linux Forums  

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
Problem with find and tar venu_nbk UNIX for Dummies Questions & Answers 2 11-20-2006 10:41 AM
FIND/GREP problem dfb500 UNIX for Dummies Questions & Answers 1 11-13-2006 11:13 AM
problem with find braindrain Shell Programming and Scripting 2 03-29-2006 01:33 PM
Problem with find ! -newer dbfree Shell Programming and Scripting 3 12-19-2005 10:56 PM
Problem with `find ...` Cameron Shell Programming and Scripting 4 08-10-2005 08:24 AM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 02-22-2005
sethkor sethkor is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 4
Unhappy Another Find Problem

HI All,
I am having a bit of trouble using the find command in my shell (korn) script.
I was hoping someone could help me.

I am trying to build up a dynamic find command based on some parameters.

When I execute the command I get the following error:
find: incomplete statement

I have attached a stripped down version of the code which has the problem.

Any help would be apprecieated.
Thanks

if [ -n "$opt_file" ]
then
cat_str='\| nice -n 15 cat > '${opt_file}
else
cat_str='\| more'
fi

if [ -n "$opt_operator" ]
then
grep_str='\|nice -n 15 grep '${grep_str}

fi

if [ "$opt_enddate" -eq "$opt_startdate" ]
then
theExecStr="nice -n 15 find . -name \*.gz -exec nice -n 15 gunzip -c {} \; ${grep_str}${cat_str}"

$theExecStr
fi
 

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 10:18 AM.


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