On Fri, Feb 27, 2015 at 5:40 AM, Jake anderson <[email protected]> wrote: > Hello Group, > > Is there a command within Unix to find a particular String 'GID' or 'UID' > in a config file ? > > Jake >
I'm somewhat unsure of what you want. But just going on what I think you want, the "egrep" command would work. Something like: egrep '[GU]ID' config.file.txt This is a extended regular expression. the [GU] says to match either a "G" or a "U", followed by the characters "UID". Another possibility is egrep 'GID|UID' config.file.txt This says to find "GID" or (the | is the or operator) "UID". This latter example is perhaps a bit more understandable to someone who is not really familiar with regular expressions. -- He's about as useful as a wax frying pan. 10 to the 12th power microphones = 1 Megaphone Maranatha! <>< John McKown ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 ---------------------------------------------------------------------- For more information on Linux on System z, visit http://wiki.linuxvm.org/
