The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Simple Scripting Problem felixwhoals Shell Programming and Scripting 3 12-16-2007 09:24 AM
Very simple argument in scripting question eeto UNIX for Dummies Questions & Answers 2 03-26-2007 11:47 PM
Simple Array in Ksh Scripting ravikirankethe UNIX for Dummies Questions & Answers 2 11-01-2006 07:35 AM
HELP me PLS... Simple Scripting! liezer Shell Programming and Scripting 2 09-14-2006 06:50 AM
any tutorials on simple scripting? xyyz UNIX for Dummies Questions & Answers 3 03-13-2003 09:31 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-23-2001
Registered User
 

Join Date: Jul 2001
Location: Connecticut
Posts: 20
simple scripting question

I am new to scropting and I am just trying to work on a few simple things....
Using sh I want to do something similar to the follwoing run a simple command like a dig then I want it to get the server that it is authorotative and return it to me saying somehting like xx.xx is authorotative. I am not getting how to make it check the results and return a specific part to me how do I make it check the results it recieved and return a specific part of the results to me does this make sense? Is it possible. This is only an example of somethign I am trying to do I understand how to make it so that if a particualr event is true then do this but I dont understand how to make it check to see if that particualr even is present does this make sense let me know.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 10-23-2001
PxT's Avatar
PxT PxT is offline
Registered User
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
You can use 'grep' to look for some specific output and then perform any action based on those results. Recommend purchasing or borrowing an introductory shell scripting book. Check the FAQ section of this forum for recommendations.
Reply With Quote
  #3 (permalink)  
Old 10-23-2001
Registered User
 

Join Date: Jul 2001
Location: Connecticut
Posts: 20
hmmm

I dont see how I could sue grep to search for a specific output when the output is going to be diffrent each time example in the case of a dig the authorative server is going to be different every time so I can't search for anythign specific. So I dont see how grep would work let me know
Reply With Quote
  #4 (permalink)  
Old 06-16-2005
Registered User
 

Join Date: Jun 2005
Posts: 1
post proper question ,in detail

Quote:
Originally Posted by gennaro
I dont see how I could sue grep to search for a specific output when the output is going to be diffrent each time example in the case of a dig the authorative server is going to be different every time so I can't search for anythign specific. So I dont see how grep would work let me know

Pls post the question in detail,So we can give the answer.
But as per my thinking you want to search specific patern in a file,then you can directly type like this :

$grep (patern_name) filename
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 03:39 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0