Dec 6, 2004 #1 BryanY MIS Joined Aug 18, 2001 Messages 54 Location US Ok, basically I want to search a text file to see if one word, or another word, or a third word is present. I tried grep -F 'first second third' file but it doesn't seem to work. Any suggestions? (i used /usr/xpg4/bin/grep [Solaris] )
Ok, basically I want to search a text file to see if one word, or another word, or a third word is present. I tried grep -F 'first second third' file but it doesn't seem to work. Any suggestions? (i used /usr/xpg4/bin/grep [Solaris] )
Dec 6, 2004 #2 vgersh99 Programmer Joined Jul 27, 2000 Messages 2,146 Location US egrep '(first|second|third)' file vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+ Upvote 0 Downvote
egrep '(first|second|third)' file vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+
Dec 6, 2004 #3 vgersh99 Programmer Joined Jul 27, 2000 Messages 2,146 Location US or: /usr/xpg4/bin/grep -E '(first|second|third)' file vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+ Upvote 0 Downvote
or: /usr/xpg4/bin/grep -E '(first|second|third)' file vlad +----------------------------+ | #include<disclaimer.h> | +----------------------------+
Dec 6, 2004 #4 ericbrunson Technical User Joined Jan 9, 2004 Messages 2,092 Location US or "grep -e first -e second -e third file Upvote 0 Downvote
Dec 6, 2004 #5 fredericofonseca IS-IT--Management Joined Jun 2, 2003 Messages 3,324 Location PT But really nothings is better than man grep Regards Frederico Fonseca SysSoft Integrated Ltd http://www.syssoft-int.com Upvote 0 Downvote
But really nothings is better than man grep Regards Frederico Fonseca SysSoft Integrated Ltd http://www.syssoft-int.com