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 and shell scripting languages 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 01:24 PM
Very simple argument in scripting question eeto UNIX for Dummies Questions & Answers 2 03-27-2007 03:47 AM
Simple Array in Ksh Scripting ravikirankethe UNIX for Dummies Questions & Answers 2 11-01-2006 11:35 AM
HELP me PLS... Simple Scripting! liezer Shell Programming and Scripting 2 09-14-2006 10:50 AM
any tutorials on simple scripting? xyyz UNIX for Dummies Questions & Answers 3 03-13-2003 01:31 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rating: Thread Rating: 1 votes, 5.00 average. Display Modes
  #1 (permalink)  
Old 10-23-2001
gennaro gennaro is offline
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.
  #2 (permalink)  
Old 10-23-2001
PxT's Avatar
PxT PxT is offline Forum Advisor  
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.
  #3 (permalink)  
Old 10-23-2001
gennaro gennaro is offline
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
  #4 (permalink)  
Old 06-17-2005
mr_viveknp mr_viveknp is offline
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
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:16 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0