[Novalug] bash commands

dtidrow at patriot.net dtidrow at patriot.net
Fri Jan 18 15:28:03 EST 2008


> Some systems have rgrep, but in the absense of that...
>
> cd WHEREVER
>
> then either
>         find . -name \*.f -print0 | xargs -0 grep 'string' /dev/null
>
Generally I do it this way:
    find . -name \*.f -exec grep 'string' {} \;

The above comand runs grep on every file found - the '{}' supplies the
filename to grep, and the '\;' tells -exec where the command ends

Don



More information about the Novalug mailing list