Computing.Net > Forums > Unix > Look for certain text.

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Look for certain text.

Reply to Message Icon

Name: mahive
Date: October 23, 2009 at 05:51:16 Pacific
OS: SUN Solaris
Subcategory: General
Comment:

I need to write a unix script that will look for certain text in a file and then email me if it finds it.
Can someone please help me?



Sponsored Link
Ads by Google

Response Number 1
Name: tvc
Date: October 23, 2009 at 09:01:24 Pacific
Reply:

There's 2 parts to this thing:

- have a piece of code checking on "text", and deciding if text is there or not, GREP would be part of that solution

- mail if the previous result was true ... check how you need to mail from the command line, write a script, check if a command you know can do that ... start there, cause if you can't mail, you won't get anywhere

I don't know what Solaris default command line mail tool is, find that out first


0
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Look for certain text.

Looking for ATI M3 VGA Driver for Solaris 8 www.computing.net/answers/unix/looking-for-ati-m3-vga-driver-for-solaris-8/1468.html

Looking for Unix/Linux Administrators. www.computing.net/answers/unix/looking-for-unixlinux-administrators/2311.html

Looking for a web control panel for a we www.computing.net/answers/unix/looking-for-a-web-control-panel-for-a-we/2204.html