Dec 21, 2001 #1 Jonathan777 Technical User Joined Aug 23, 2001 Messages 26 Location US How do I grep two or more variables from a file. Thanks. Jon
Dec 22, 2001 #2 FarahRegal Technical User Joined Jun 13, 2001 Messages 123 Location GB You egrep finding multiple patters e.g # egrep " user1|user2" /etc/passwd # egrep "[Mm]other |[Bb]rother" <filename> The Pipe in this command is instructed to match lines containing either brother or mother, capitalized or not. . Farah regal good luck "think twice and hit enter once" Upvote 0 Downvote
You egrep finding multiple patters e.g # egrep " user1|user2" /etc/passwd # egrep "[Mm]other |[Bb]rother" <filename> The Pipe in this command is instructed to match lines containing either brother or mother, capitalized or not. . Farah regal good luck "think twice and hit enter once"