parsing files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Running RedHat 7.3, 8, 9, ES 3 & ES 4. Does anybody know of a script or just a command line command that I can use to parse a bunch of files for @aol.com and report to me just the "pwd" of the file and the lines in them that contain @aol.com I think grep or egrep can do this, but for some reason, I cannot get the correct syntax down. It needs to do something like:
grep /home/virtual/*/etc/aliases
Ideally, I would want what the asterisks instead of the "pwd" to the file since that is the part that will tell me what domain it is on. So the report could be something like this:

#root>grep /home/virtual/*/etc/aliases
domain1.com
localname name@xxxxxxx
localname2 name2@xxxxxxx

domain9.net
localname3 name3@xxxxxxx
localname4 name4@xxxxxxx

Thanks In Advance
Steve

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux