12-11-2007
OK, I have the first two parts done, the following sed arguments produce the output I need, but I dont know how to insert the - symbol before the IP's. Anyone got any ideas?
#!/bin/sh
whois $1 | grep "Name Server"|sed "s/ //"
dig +short $1 mx|sed "s/[0-9][0-9] /+/"
dig +short mail.$1
[jjamd64@localhost ~]$ ./dn.sh google.com
Name Server: NS1.GOOGLE.COM
Name Server: NS2.GOOGLE.COM
Name Server: NS3.GOOGLE.COM
Name Server: NS4.GOOGLE.COM
+smtp3.google.com.
+smtp4.google.com.
+smtp1.google.com.
+smtp2.google.com.
googlemail.l.google.com.
66.249.83.83
66.249.83.19
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
how to parse the command line argument to look for '@' sign and the following with '.'.
In my shell script one of the argument passed is email address. I want to parse this email address to look for correct format.
rmjoe123@hotmail.com has '@' sign and followed by a '.'
to be more... (1 Reply)
Discussion started by: rmjoe
1 Replies
2. Shell Programming and Scripting
Hi,
I have a requirement. I have an application which can take a file as inputs. Now the file can contain any number of lines. The tool has to pick up the first uncommented line and begin processing it.
For example the file could be like this:
#MANI123|MANI1234
#MANI234|MANI247... (4 Replies)
Discussion started by: sendhilmani123
4 Replies
3. Shell Programming and Scripting
I have record line somthing like below with first line showing char spacing not real record line
1 | 2 | 3rd Field--------------|-4th field--| This is charcatersapcing of line
DF20000000000000000130.7890000000750
I shoudl get two line from above line
1st line should
1 | 2 | 3rd... (3 Replies)
Discussion started by: unishiva
3 Replies
4. Shell Programming and Scripting
I need to parse a string in a shell script. I understand there is some in built function to use that. can someone explain the syntax ?
Say, it is like this
#!/bin/ksh
read input
# input is entered as 'welcome'
#Now I want to extract say only first 4 characters or last four #characters.
... (19 Replies)
Discussion started by: asutoshch
19 Replies
5. Shell Programming and Scripting
Hi I Have log like this :
0 234: {
3 2: 04 EE
7 14: '20081114081'
23 1: 00
79 10: '38809'
91 15: '528111510010159'
143 29: 'Streaming/downloading service'
174 3: 'MTV'
179 43: 'rtsp://172.28/MTV2GO-Loop.sdp'
224 1: 05
... (10 Replies)
Discussion started by: justbow
10 Replies
6. Shell Programming and Scripting
Hello,
I'm a starting shell scripter and no Perl knowledge. I've trying to do this for a while:
I want to parse an XML file and get certain data out of it and write that data into a CSV file, all this using Shell Scripting (in Bash). Or Perl without any XML Parser/Interpreter (if possible).
... (1 Reply)
Discussion started by: Kage Musha
1 Replies
7. Shell Programming and Scripting
Below is a XML I have...
<?xml version="1.0" encoding="UTF-8" ?>
<component
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:XXXXX-www-Install-Manifest manifest.xsd"
xmlns="urn:qqqqq-Install-Manifest"
name="OM"
... (1 Reply)
Discussion started by: dashok.83
1 Replies
8. Shell Programming and Scripting
I have a xml file like this
<bul:collectionStrategy name="strategy1">
<bul:collectionTemplateGroup name="15min group"/>
<bul:collectionTemplateGroup name="hourly group"/>
</bul:collectionStrategy>
<bul:CollectionTemplateGroup name="hourly group" >
... (2 Replies)
Discussion started by: LavanyaP
2 Replies
9. Shell Programming and Scripting
I have a file parameters.txt which contains
151524
151525
I have another file OID.csv which contains
NE Version Object Type ID SDK param name Object OID
test1 Start: 4.2 End: 4.2 pan 151524 speed ... (5 Replies)
Discussion started by: LavanyaP
5 Replies
10. Shell Programming and Scripting
Well, issue is i have to parse this script to get the VERSION:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleAllowMixedLocalizations</key>
... (9 Replies)
Discussion started by: zorosinister
9 Replies
LEARN ABOUT DEBIAN
google-pprof
PPROF(1) Google PPROF(1)
NAME
google-pprof - manual page for google-pprof (part of gperftools)
SYNOPSIS
google-pprof [options] <program> <profile>
DESCRIPTION
Prints specified cpu- or heap-profile
OPTIONS
--cum Sort by cumulative data
--base=<base>
Subtract <base> from <profile> before display
Reporting Granularity:
--addresses
Report at address level
--lines
Report at source line level
--functions
Report at function level [default]
--files
Report at source file level
Output type:
--text Generate text report [default]
--gv Generate Postscript and display
--list=<regexp>
Generate source listing of matching routines
--disasm=<regexp>
Generate disassembly of matching routines
--dot Generate DOT file to stdout
--ps Generate Postcript to stdout
--pdf Generate PDF to stdout
--gif Generate GIF to stdout
Heap-Profile Options:
--inuse_space
Display in-use (mega)bytes [default]
--inuse_objects
Display in-use objects
--alloc_space
Display allocated (mega)bytes
--alloc_objects
Display allocated objects
--show_bytes
Display space in bytes
--drop_negative
Ignore negaive differences
Call-graph Options:
--nodecount=<n>
Show at most so many nodes [default=80]
--nodefraction=<f>
Hide nodes below <f>*total [default=.005]
--edgefraction=<f>
Hide edges below <f>*total [default=.001]
--focus=<regexp>
Focus on nodes matching <regexp>
--ignore=<regexp>
Ignore nodes matching <regexp>
--scale=<n>
Set GV scaling [default=0]
EXAMPLES
google-pprof /bin/ls ls.prof
Outputs one line per procedure
google-pprof --gv /bin/ls ls.prof
Displays annotated call-graph via 'gv'
google-pprof --gv --focus=Mutex /bin/ls ls.prof
Restricts to code paths including a .*Mutex.* entry
google-pprof --gv --focus=Mutex --ignore=string /bin/ls ls.prof
Code paths including Mutex but not string
google-pprof --list=getdir /bin/ls ls.prof
Dissassembly (with per-line annotations) for getdir()
google-pprof --disasm=getdir /bin/ls ls.prof
Dissassembly (with per-PC annotations) for getdir()
COPYRIGHT
Copyright (C) 2005 Google Inc.
SEE ALSO
Further documentation for google-pprof is maintained as a web page called cpu_profiler.html and is likely installed at one of the following
locations:
/usr/share/gperftools/cpu_profiler.html
/usr/local/share/gperftools/cpu_profiler.html
google-pprof (part of gperftools) February 2005 PPROF(1)