Sep 21, 2005 #1 Michael42 Programmer Joined Oct 8, 2001 Messages 1,454 Location US Hello All, In a Bourne shell script how can I test if a text log file contains the string ORA- ? Thanks, Michael42
Hello All, In a Bourne shell script how can I test if a text log file contains the string ORA- ? Thanks, Michael42
Sep 21, 2005 1 #2 feherke Programmer Joined Aug 5, 2002 Messages 9,541 Location RO Hi Code: grep -q ORA- log.file && echo "Yes, it contains" Feherke. http://rootshell.be/~feherke/ Upvote 0 Downvote
Sep 21, 2005 1 #3 TrojanWarBlade Programmer Joined Apr 13, 2005 Messages 1,783 Location GB Or just Code: grep 'ORA-' log.file and "grep" will echo all the lines that contain that string. Trojan. Upvote 0 Downvote
Or just Code: grep 'ORA-' log.file and "grep" will echo all the lines that contain that string. Trojan.
Sep 21, 2005 Thread starter #4 Michael42 Programmer Joined Oct 8, 2001 Messages 1,454 Location US Thanks guys. I think sometimes I make things too hard. Your suggestions were perfect. Thanks, Michael42 Upvote 0 Downvote
Thanks guys. I think sometimes I make things too hard. Your suggestions were perfect. Thanks, Michael42