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
Find and replace problem ali560045 Shell Programming and Scripting 5 06-25-2009 08:08 AM
Problem with find and tar venu_nbk UNIX for Dummies Questions & Answers 2 11-20-2006 10:41 AM
problem with find braindrain Shell Programming and Scripting 2 03-29-2006 01:33 PM
Problem with `find ...` Cameron Shell Programming and Scripting 4 08-10-2005 08:24 AM
Another Find Problem sethkor Shell Programming and Scripting 6 02-24-2005 07:56 PM

Reply
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 09-29-2009
crackthehit007 crackthehit007 is offline
Registered User
  
 

Join Date: Feb 2009
Location: Pune/Banagalore
Posts: 71
Exclamation find problem


Code:
for index in `find /root -name *.jar | grep "/lib"`; do echo "$index"; done

sometimes its throwing error saying

find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]

some1 suggested me that :

Code:
for index in `find /technologies -name '*.jar' | grep "/lib"`
do
echo "$index"
done


my jar name dont have any spaces.
but still it throwing
Usage: find [-H] [-L] [-P] [path...] [expression]


wats difference between '*.jar' and only *.jar wrt find command ?

can some1 exaplin with example ?
  #2 (permalink)  
Old 09-29-2009
aigles's Avatar
aigles aigles is offline Forum Advisor  
Registered User
  
 

Join Date: Apr 2004
Location: Bordeaux, France
Posts: 1,433
Enclose file name between quotes :

Code:
for index in `find /root -name '*.jar' | grep "/lib"`; do echo "$index"; done

Jean-Pierre.
  #3 (permalink)  
Old 09-29-2009
crackthehit007 crackthehit007 is offline
Registered User
  
 

Join Date: Feb 2009
Location: Pune/Banagalore
Posts: 71
wats difference between them..
explain in detail with example
Reply

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:23 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