Sponsored Content
Full Discussion: getting own ip address
Operating Systems Solaris getting own ip address Post 302259127 by System Shock on Monday 17th of November 2008 10:18:32 AM
Old 11-17-2008
No need for the cat. Add a grep-v pipe.
Code:
grep `hostname` /etc/hosts | grep -v 127.0.0.1 | awk '{print $1}'

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

network address and broadcast address?

say I have a IP address which is 10.0.0.12, and subnet mask is 255.255.255.240, what is the network address and what is the broadcast address which host lives on? And could you explain how to get the answer? thanx in advance! (7 Replies)
Discussion started by: pnxi
7 Replies

2. IP Networking

How to Achive IP address through MAC(Ethernet) address

Hi sir, i want to make such programe which takes MAC(Ethernet) address of any host & give me its IP address....... but i'm nt getting that how i can pass the MAC address to Frame........ Please give me an idea for making such program... Thanks & regards Krishna (3 Replies)
Discussion started by: krishnacins
3 Replies

3. Shell Programming and Scripting

ksh - how to list all ip address between 2 ip address

Trying to do a ksh script that needs to list all ip address between ip address a and b .. ie. Ip address A=192.168.1.200 Ip address B=192.168.2.15 So the subnet changes from 1 to 2 but I want to list all possible ip addresses between the 2.. Which would be: 192.168.1.200... (4 Replies)
Discussion started by: frustrated1
4 Replies

4. UNIX for Dummies Questions & Answers

Panic kernal-mode address fault on user address 0x14

:) Firstly Hi all!!, im NEW!! and on here hoping that someone might be able to offer me some help... i have a server that keeps crashing every few days with the error message: PANIC KERNAL-MODE ADDRESS FAULT ON USER ADDRESS 0X14 KERNAL PAGE FAULT FROM (CS:EIP)=(100:EF71B5BD) EAX=EF822000... (10 Replies)
Discussion started by: Twix
10 Replies

5. Solaris

Get ip address from mac address

I have following message in my messages file on solaris 10 WARNING: e1000g3712000:3 has duplicate address 010.022.196.011 (in use by 00:50:56:85:25:ef); disabled Now is there any way i can find which server has 00:50:56:85:25:ef mac address either IP or Hostname ? (6 Replies)
Discussion started by: fugitive
6 Replies

6. UNIX for Dummies Questions & Answers

What would the physical address be for virtual address?

Hi guys, I got one problem which I definetily no idea. What would the physical address be for virtual address? 1) 2ABC 2) 3F4B Here is the page table:see attached Thank you sos sososososso much!! (0 Replies)
Discussion started by: lemon_06
0 Replies

7. IP Networking

Tracing a MAC address to IP address: Solaris

Hi there I lost connectivity to one of our remote systems and when I checked the messages log I found the following: Aug 10 23:42:34 host xntpd: time reset (step) 1.681729 s Aug 16 13:20:51 host ip: WARNING: node "mac address" is using our IP address x.x.x.x on aggr1 Aug 16 13:20:51 host... (9 Replies)
Discussion started by: notreallyhere
9 Replies

8. UNIX for Advanced & Expert Users

C program to detect duplicate ip address if any after assigning ip address to ethernet interface

Hi , Could someone let me know how to detect duplicate ip address after assigning ip address to ethernet interface using c program (3 Replies)
Discussion started by: Gopi Krishna P
3 Replies

9. IP Networking

MAC Address - Four Interfaces with the same MAC Address

four interfaces with ifconfig all interfaces have the same mac. If is not set for unique. but it still works. what difference does it make to have all macs the same or different? (4 Replies)
Discussion started by: rrodgers
4 Replies
netdb(n)							 Tnm Tcl Extension							  netdb(n)

__________________________________________________________________________________________________________________________________________________

NAME
netdb - Access the local network databases. _________________________________________________________________ DESCRIPTION
The netdb command provides access to network information that is stored in configuration files, the Network Information Service (NIS) or in the Domain Name System (DNS). The results of the netdb command usually depend on the local configuration of your operating system. NETDB COMMAND
netdb hosts netdb hosts name address netdb hosts address name The first version of the netdb hosts command returns a list of all locally known hosts. Each element of this list contains a host name and its IP address. The result is an empty list on many systems that are configured to use the DNS for hostname lookups. The second version of the netdb hosts command converts an IP address into a host name and the third version of the netdb hosts command converts a host name into an IP address. netdb networks netdb networks name address netdb networks address name The first version of the netdb networks command returns a list of all locally known networks. Each element of this list contains a network name and the IP network address. The second version of the netdb networks command returns the network name that belongs to the IP network address and the third version of the netdb networks command returns the network address that belongs to a given net- work name. netdb protocols netdb protocols name number netdb protocols number name The first version of the netdb protocols command returns a list of all locally known Internet protocols. Each element of this list contains a protocol name and its protocol number. The second version of the netdb protocols command returns the protocol name that belongs to number and the third version of the netdb protocols command returns the protocol number that belongs to a protocol name. netdb services netdb services name number protocol netdb services number name protocol The first version of the netdb services command returns the list of all locally known services. Each element of this list contains a service name, the service number and the transport protocol. The second version of the netdb services command returns the service name for the service described by number and protocol. The third version of the netdb services command returns the protocol number for the service described by name and protocol. netdb sunrpcs netdb sunrpcs name number netdb sunrpcs number name The first version of the netdb sunrpcs command lists all locally known Sun RPCs. Each element of this list contains a RPC name and its registration number. The second version of the netdb sunrpcs command returns the RPC name for a given RPC number and the third version of the netdb sunrpcs command returns the RPC number for a given RPC name. netdb ip class address netdb ip range address mask The first version of the netdb ip command returns the IP class of the given address. The following classes are recognized: A, B, C, D and loopback. The second version of the netdb ip command returns the list of IP addresses in the address range given by address and mask. SEE ALSO
scotty(1), Tnm(n), Tcl(n) AUTHORS
Juergen Schoenwaelder <schoenw@cs.utwente.nl> Tnm netdb(n)
All times are GMT -4. The time now is 05:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy