Sponsored Content
Top Forums Shell Programming and Scripting dig-x: only part of the output is needed Post 302485629 by Abdulelah on Wednesday 5th of January 2011 06:44:19 PM
Old 01-05-2011
dig-x: only part of the output is needed

Hi everyone,

how can I get the highlighted text only?

I am only concerned with the first line of the "
AUTHORITY SECTION" (in red).

Quote:
; <<>> DiG 9.6.2-P2-RedHat-9.6.2-4.P2.fc11 <<>> -x 173.194.37.104
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58891
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 4

;; QUESTION SECTION:
;104.37.194.173.in-addr.arpa. IN PTR

;; ANSWER SECTION:
104.37.194.173.in-addr.arpa. 35692 IN PTR lhr14s02-in-f104.1e100.net.

;; AUTHORITY SECTION:
194.173.in-addr.arpa. 34043 IN NS NS3.GOOGLE.COM.
194.173.in-addr.arpa. 34043 IN NS NS1.GOOGLE.COM.
194.173.in-addr.arpa. 34043 IN NS NS2.GOOGLE.COM.
194.173.in-addr.arpa. 34043 IN NS NS4.GOOGLE.COM.

;; ADDITIONAL SECTION:
NS1.GOOGLE.COM. 289233 IN A 216.239.32.10
NS2.GOOGLE.COM. 289233 IN A 216.239.34.10
NS3.GOOGLE.COM. 289233 IN A 216.239.36.10
NS4.GOOGLE.COM. 289233 IN A 216.239.38.10

;; Query time: 12 msec
;; SERVER: 131.251.0.4#53(131.251.0.4)
;; WHEN: Wed Jan 5 23:39:01 2011
;; MSG SIZE rcvd: 231
thank you in advance
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

SA288-sun solaris for systemm admin8,part II pdf needed

Hi All, can any1 plz upload me the SA288-sun solaris for system admin8,part II pdf. I need to do the certification.................plz help me at the earliest Thanks to all (4 Replies)
Discussion started by: iliyas
4 Replies

2. Shell Programming and Scripting

Redirecting part of output to stdout

Hi, I am trying to execute a command like this: find ./ -name "*.gz" -exec sh -c 'zcat {} | awk -f parse.awk' \; >> output If I want to print the filename, i generally use the -print argument to the find command but when I am redirecting the output to a file, how can I print just the... (2 Replies)
Discussion started by: Legend986
2 Replies

3. UNIX for Dummies Questions & Answers

Dig command output?

all, i am newbie to dns bind . Any help is very appreciated. I am using dig command to view the records in the config. I am expecting the following comamnds to display all the A (Address records) in the zone data file. my zone data file looks like this ------------------- $ORIGIN . $TTL... (2 Replies)
Discussion started by: sujathab
2 Replies

4. Solaris

How to capture only some part of output when command executed??

Hi, When I execute this command prtdiag -v output sample : System clock frequency: 160 MHZ Memory size: 4GB ==================================== CPUs ==================================== E$ CPU CPU CPU Freq Size ... (4 Replies)
Discussion started by: vijaysachin
4 Replies

5. Shell Programming and Scripting

need a part of output data as output

HI Guys, I need some expert help.. i have this below data as input WHERE StartTime >= '2010-03-24 20:10:08' AND username in('abc_xxx_yyy_01') and output need is just in appreciate your help on this !!!! thanks you ... (8 Replies)
Discussion started by: nitinrp1
8 Replies

6. Shell Programming and Scripting

Cutting Part of Output

Hello all I'm using bourne shell and need to figure out how to cut out a specific portion of some output. For example, my output from my command is: 12.12.52.125.in-addr.arpa name = hostname.domain.main.gov I need to get just the "hostname.domain.main.gov" part. What I'm trying... (9 Replies)
Discussion started by: lee.n.doan
9 Replies

7. Shell Programming and Scripting

How to extract one part from whole output

Hi All, I am trying to write a small shell programming to get db2 database size info. The command I am going to use is- db2 "CALL GET_DBSIZE_INFO(?, ?, ?, -1)" and the output of above command generally is- Value of output parameters -------------------------- Parameter Name :... (4 Replies)
Discussion started by: NARESH1302
4 Replies

8. Shell Programming and Scripting

search needed part in text file (awk?)

Hello! I have text file: From aaa@bbb Fri Jun 1 10:04:29 2010 --____OSPHWOJQGRPHNTTXKYGR____ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline My code '234565'. ... (2 Replies)
Discussion started by: candyme
2 Replies

9. Shell Programming and Scripting

Read file, send to dig, no output

From the command line I am running the following command: for i in $(awk '{print ($1)}' src-dst|uniq); do dig -x "$i" +short; done src-dst has a list of IP addresses. When this script is running and I do a ps -ef | grep dig, I see the proper dig command with IP addresses being run, but the... (2 Replies)
Discussion started by: phish
2 Replies

10. UNIX for Beginners Questions & Answers

Extract a part of grep output

Hi, On AIX 7 I have : grep 's_ohs_instance_loc' $CONTEXT_FILE <ohs_instance_loc oa_var="s_ohs_instance_loc">/u01/appl_top/env/fs1/FMW_Home/webtier/instances/EBS_web_env_OHS1</ohs_instance_loc> But I need only this part:... (4 Replies)
Discussion started by: big123456
4 Replies
SPLIT(1)								FSF								  SPLIT(1)

NAME
split - split a file into pieces SYNOPSIS
split [OPTION] [INPUT [PREFIX]] DESCRIPTION
Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default PREFIX is `x'. With no INPUT, or when INPUT is -, read standard input. Mandatory arguments to long options are mandatory for short options too. -a, --suffix-length=N use suffixes of length N (default 2) -b, --bytes=SIZE put SIZE bytes per output file -C, --line-bytes=SIZE put at most SIZE bytes of lines per output file -l, --lines=NUMBER put NUMBER lines per output file --verbose print a diagnostic to standard error just before each output file is opened --help display this help and exit --version output version information and exit SIZE may have a multiplier suffix: b for 512, k for 1K, m for 1 Meg. AUTHOR
Written by Torbjorn Granlund and Richard M. Stallman. REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>. COPYRIGHT
Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. SEE ALSO
The full documentation for split is maintained as a Texinfo manual. If the info and split programs are properly installed at your site, the command info split should give you access to the complete manual. split (coreutils) 4.5.3 February 2003 SPLIT(1)
All times are GMT -4. The time now is 11:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy