November 20th, 2003, 03:15 AM
find rcp and remsh in script files
Hopefully you can help this newbie out.......!!!!!!!
I'm trying to get a list of "rcp" and "remsh" with are mentioned in script files.
I have tried grep rcp * but that is not giving me the expected result.
November 21st, 2003, 11:59 AM
Grep is the tool to use.
grep rcp * (like you said) looks for rcp in all the files that are in the directory you issued the command (not the sub dirs!).
If the command doesn't return anything: rcp is not in any of the files.
It could be that rcp/remsh are in capitals (which is strange because both are commands). In any case, if you want to search ignoring case you can use the -i option (see man grep for more options).
If you want to find rcp and remsh in one run you can use egrep:
egrep 'rcp|remsh' *