Solved

DNS host-name resolution

Posted on 2001-07-25
6
219 Views
Last Modified: 2010-03-18
Slightly odd one this ......

iIs it possible to configure DNS resolution to return a non-fully qualified host-name????

For example if I enter the following ....

         host <name>

on a unix box, I currently get ...

         <name>.<domain> a.b.c.d

This is fine but I need to just get .....

         <name>  a.b.c.d   (no domain)

Is it possible to achieve this by DNS configuration or do I need to setup some script filtering etc ?????

Many thanks for any help !!!
0
Comment
Question by:rigsby
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:garisoain
ID: 6317552
0
 
LVL 4

Expert Comment

by:garisoain
ID: 6317607
0
 
LVL 5

Expert Comment

by:vsamtani
ID: 6318001
No, you need a little script filtering. It's not hard though. My version of host requires the following:

#!/bin/bash

echo -n $1
echo -n " "
host $1 | awk 'END {print $4}'


Save the above in your path somewhere, chmod to make it executable, and then

<name of script> <hostname>

If it doesn't work, post the output of your host command here so I can modify the script.

Vijay
0
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
LVL 5

Accepted Solution

by:
vsamtani earned 200 total points
ID: 6318015
In fact, the script can be made into a one-liner:

#!/bin/bash
echo $1 `host $1 | awk 'END {print $4}'`

0
 
LVL 4

Expert Comment

by:garisoain
ID: 6318086
=( that's what I was trying to post... =/ ... bad look today.

I use:
#!/bin/sh
# script.sh - usage: "script.sh <name>"
IPADDR = `host $1 | awk ' {print $2}'`
echo $1 $IPADDR

gets the same result.

=)
-garisoain
0
 

Author Comment

by:rigsby
ID: 6321970
Your help is very much appreciated !!!
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
What antennae works with Linux? 7 80
UPD maximums on Red Hat 6 110
linux, squid server 23 51
What is native VPN for RedHad Enterprise Linux and CentOS? 6 141
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now