|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
executing command outputs in bash
hi all
i want to use the each output of such commands like find or ls for example i have function called make_sth() and i want all of the outputs of "find /var/www -type f" to be executed with make_sth() i hope i managed to explain my problem best regards... |
|
#2
|
||||
|
||||
|
you can auto-interpolate find results into a pair of curly braces {} eg
find /usr -name *.c -exec grep main \{\} \; -print. will find in /usr all files with a .c extention and then grep for main function definitions from each result, as if they were interpolated one by one into the braces. the results are then printed So the important thing here is the -exec option I'm talking backwards christo
__________________
. Spiration channels: Free scripts, programming tutorials and articles Dotcut alerts: Online Press cuttings / news alerts Clearprop: UK microlight school, wiltshire Uk dating: UK safe dating with Topdates About Christo . . |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > executing command outputs in bash |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|