![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| whats wrong in this pls help how to take $i value ? | santosh1234 | Shell Programming and Scripting | 3 | 12-26-2008 09:28 AM |
| tell me whats wrong with this | nadman123 | Shell Programming and Scripting | 1 | 04-14-2008 11:58 PM |
| tell me whats wrong in this? | nadman123 | Shell Programming and Scripting | 1 | 04-10-2008 01:11 AM |
| Whats wrong with this script? | kayarsenal | Shell Programming and Scripting | 2 | 08-25-2006 09:58 AM |
| whats wrong with this awk??? | george_ | Shell Programming and Scripting | 5 | 04-04-2006 04:58 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
whats wrong with this find statement ?
cmd="find /a/technologies -name '*.jar' | grep \"Tuning/specificloader/lib\""
echo $cmd for index in `$cmd` do SL_JARS="${SL_JARS}:${index}" done gives error ==> find: paths must precede expression Usage: find [-H] [-L] [-P] [path...] [expression] but for index in `find /a/technologies -name *.jar | grep "Tuning/specificloader/lib"` do SL_JARS="${SL_JARS}:${index}" done is working fine |
|
||||
|
Hi,
When you are substituting the output of a command to a varibale you must use the backticks ( The one below the ~ sign in keyboard). so the substitution will be like this-- Code:
cmd="`find /a/technologies -name '*.jar' | grep \"Tuning/specificloader/lib\"`" NT |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|