user1169587
user1169587

Reputation: 1336

grep: Not a recognized flag: R

if AIX has no -r flag for grep command, how to do recursive search in a folder?
I don't know the version of AIX but I think it is 4.3

grep -R IBM /tmp
grep: Not a recognized flag: R
Usage: grep [-E|-F] [-c|-l|-q] [-insvxbhwy] [-p[parasep]] -e pattern_list...
    [-f pattern_file...] [file...]

Upvotes: 0

Views: 1118

Answers (1)

wwwutz
wwwutz

Reputation: 136

given you have 'xargs' and 'find' installed:

find /tmp -type f -print0 | xargs -0 grep IBM 

a try.

-print0 is essential when reaching files/folder containing weird white-spaces.

Upvotes: 1

Related Questions