02-21-2016
My input is like so:
A B 1.1.1.1 C 2.2.2.2 D E F
This yielded an undesired output.
awk ' { print (system("nslookup " FS $0 FS "2>&1 > /dev/null")) ? "NA" : $0 } ' file > newfile
Cannot lookup A
NA
I'm looking to resolve the two IPS and send to file. If they are not resolvable, then output NA for the respective output.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Guys ,
Am using Linux - Red Hat 6.1 .
My DNS and nslookup command was working fine and ppl. can resolve through this server .
but i changed something in /etc/named.conf , that stopped the DNS .
The named proccess is working , but nslookup command is not , i get this error message :
... (3 Replies)
Discussion started by: tamemi
3 Replies
2. UNIX for Dummies Questions & Answers
Hi
I usually use solaris but Im working right now with a Linux box and I cannot find the nslookup command. Does Linux use this command or have an other one to do dns querys??
Thanks and sorry for such a dumb question.. :) (2 Replies)
Discussion started by: piltrafa
2 Replies
3. Shell Programming and Scripting
Hi
Anyone know of a quick and simple way to script an NSLOOKUP's from a list/text file?
Thanks,
Gav (1 Reply)
Discussion started by: gavcollins
1 Replies
4. UNIX for Advanced & Expert Users
I am having trouble configuring BIND 8.3 on Solaris 9. When I run nslookup, I get this error/message:
test# nslookup
*** Can't find server name for address 192.168.1.31: Non-existent host/domain
*** Default servers are not available
I double checked everything and I can't figure this out. I... (8 Replies)
Discussion started by: xnightcrawl
8 Replies
5. IP Networking
hi,
what would cause the nslookup to work one way but not the other?
for most machine it works both ways.
>nslookup 172.18.10.235
Server: 172.16.17.3
Address: 172.16.17.3#53
235.10.18.172.in-addr.arpa name = machine1.prod.local
>nslookup machine1
Server: ... (3 Replies)
Discussion started by: purest
3 Replies
6. UNIX for Advanced & Expert Users
I am connecting from windows via Putty to some other Unix server.
How can I display my current windows MachineName/NTID in putty?
Thanks :) (4 Replies)
Discussion started by: som.nitk
4 Replies
7. Shell Programming and Scripting
Hi guys,
I'm back to get some help again :)
I have a file that has a list of IP addresses, and I use nslookup in my script to resolve hostnames of those IPs.
the problem I'm facing is that I not all the hostnames got resolved! and I don't know why. sometimes the same duplicate IP returns a... (8 Replies)
Discussion started by: Abdulelah
8 Replies
8. Emergency UNIX and Linux Support
Hi all
Nslookup command returns!!!!
Code:
nslookup 10.91.44.29
Server: 127.0.0.1
Address: 127.0.0.1#53
29.44.91.in-addr.arpa name = station1.example.com
Code:
nslookup station1.example.com
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: ... (4 Replies)
Discussion started by: anishkumarv
4 Replies
9. Solaris
hi,
I am new in Solaris 10 , i am installing a software in solaris 10, while performing pre requisite nslookup command should return without error, and the IP address and host should match those listed in the etc/hosts file,
but nslookup command show the below error , can anybody tell me how i... (4 Replies)
Discussion started by: zeeshan047
4 Replies
10. Shell Programming and Scripting
Hey folks. Long time lurker, first time poster. I'm a bit of a newbie at "coding" (obviously, scripting is a teensy bit different than coding) and I've run into a problem that I just can't seem to get around.
I'm going through a list of servers to check their name, IP, reverse-NSLOOKUP name and... (2 Replies)
Discussion started by: Bearwhale
2 Replies
trbsd(1) General Commands Manual trbsd(1)
NAME
trbsd - Translates characters
SYNOPSIS
trbsd [-Acs] string1 string2
trbsd -d [-Ac] string1
The trbsd command copies characters from the standard input to the standard output with substitution or deletion of selected characters.
OPTIONS
Translates on a byte-by-byte basis. When you specify this option, trbsd does not support extended characters. Complements (inverts) the
set of characters in string1 with respect to the universe of characters whose codes are 001 through 377 octal if you specify -A, and all
characters if you do not specify -A. Deletes all characters in string1 from output. Changes characters that are repeated output charac-
ters in string2 into single characters.
DESCRIPTION
Input characters from string1 are replaced with the corresponding characters in string2. The trbsd command cannot handle an ASCII NUL
( 00) in string1 or string2; it always deletes NUL from the input.
The tr command is a System V compatible version of trbsd.
Abbreviations such as a-z, standing for a string of characters whose ASCII codes run from character a to character z, inclusive, can be
used to introduce ranges of characters. Note that brackets are not special characters.
Use the escape character (backslash) to remove the special meaning from any character in a string. Use the followed by 1, 2, or 3
octal digits for the code of a character.
If a given character appears more than once in string1, the character in string2 corresponding to its last appearance in string1 will be
used in the translation.
EXAMPLES
To translate braces into parentheses, enter: trbsd '{}' '()' <textfile >newfile
This translates each { (left brace) to a ( (left parenthesis) and each } (right brace) to a ) (right parenthesis). All other char-
acters remain unchanged. To translate lowercase ASCII characters to uppercase, enter: trbsd a-z A-Z <textfile >newfile The two
strings can be of different lengths: trbsd 0-9 # <textfile >newfile
This translates each digit to a # (number sign); if string2 is too short, it is padded to the length of string1 by duplicating its
last character. To translate each string of digits to a single # (number sign), enter: trbsd -s 0-9 # <textfile >newfile To trans-
late all ASCII characters that are not specified, enter: trbsd -c ' -~' 'A-_' <textfile >newfile
This translates each nonprinting ASCII character to the corresponding control key letter ( 01 translates to A, 02 to B, and so
on). ASCII DEL (177), the character that follows ~ (tilde), translates to a ? (question mark).
SEE ALSO
Commands: ed(1), sh(1), tr(1)
Files: ascii(5)
trbsd(1)