![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Simple Scripting Problem | felixwhoals | Shell Programming and Scripting | 3 | 12-16-2007 10: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 08: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 10:31 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
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.
|
|
#3
|
|||
|
|||
|
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
|
|
#4
|
|||
|
|||
|
post proper question ,in detail
Quote:
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 |
|||
| Google The UNIX and Linux Forums |