|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Using a pipe with find .... -exec ...
Hi,
I am trying to run the following command: find ./ -name lea_01.001 -print -exec CEOS {} | grep -i radio \; where "CEOS" converts the lea_01.001 files to text, then grep looks for the string "radio." This however does not work as I have constructed it. This command mostly works, but the grep filters out the full path of the current file being used (from -print). But I need that output too. find ./ -name lea_01.001 -print -exec CEOS {} \; | grep -i radio Any clues how to print the full path information and the grep only on the output of CEOS (rather than the output of find?) |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
Figured it out
Figured out my own solution:
find ./ -name lea_01.001 -print -exec sh -c 'CEOS $1 | grep -i radio' {} {} \; |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| find: missing argument to `-exec' while redirecting using find in perl | ramkumarselvam | Shell Programming and Scripting | 2 | 12-16-2011 06:48 PM |
| difference bewteen pipe, xargs, and exec | guessingo | Programming | 1 | 10-12-2011 12:28 PM |
| Newbie question on exec,fork, wait,pipe C | Cuervo | Programming | 1 | 06-06-2011 11:40 AM |
| Using MV FIND and -EXEC | degraff63 | Shell Programming and Scripting | 0 | 05-05-2009 03:54 AM |
| | with find -exec | vijay_0209 | Shell Programming and Scripting | 3 | 04-22-2009 05:23 PM |
|
|