Sponsored Content
Full Discussion: Printing hostname
Top Forums UNIX for Dummies Questions & Answers Printing hostname Post 302200019 by sysgate on Wednesday 28th of May 2008 08:39:06 AM
Old 05-28-2008
From where do you want to extract this hostname value ? You can use simple : localHostName=`hostname`; echo $localHostName
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Hostname

Hello, I am installing redhat linux 6.2 on an intel based system. Whether i want to know any naming conventions should i follow. ie Any convention to follow to name a linux machine(To give hostname). Simillarly for domain name also. Please suggest in this regard (1 Reply)
Discussion started by: bache_gowda
1 Replies

2. UNIX for Advanced & Expert Users

Printing Problems in unix ... ( Bar-cdoe - Ip Printing)

Hi guys ... i need ur help with some printing problem in unix ... first prob. : i wanna print from my NCR unix to an Win NT , Ip based printing server ( HP JetDirect ) . My issue , is it possible to print directly to an Ip address from unix ? How do i make it work to get any results ?... (3 Replies)
Discussion started by: QuickSilver
3 Replies

3. UNIX for Dummies Questions & Answers

hostname in linux

Hi i am using the Kde graphic interface, and what to know how you set the hostname in linux, what do i click? Ok thanx (6 Replies)
Discussion started by: matt2kjones
6 Replies

4. IP Networking

looking up hostname

Using Solaris 8 (or WINXP). I am trying to look up a specific DNS hostname, but I don't know which DNS server houses that entry. How can I find the hostname? nslookup gives me the following: C:\>nslookup hostname Server: dnsserver Address: x.x.x.x *** dnsserver can't find hostname:... (2 Replies)
Discussion started by: dangral
2 Replies

5. UNIX for Dummies Questions & Answers

Solaris - unknown hostname - how can I change hostname?

Hello, I am new to Solaris. I am using stand alone Solaris 10.0 for test/study purpose and connecting to internet via an ADSL modem which has DHCP server. My Solaris is working on VMWare within winXP. My WinXP and Solaris connects to internet by the same ADSL modem via its DHCP at the same... (1 Reply)
Discussion started by: XNOR
1 Replies

6. Windows & DOS: Issues & Discussions

Linux to Windows Printing: PDF starts printing from middle of page.

We are using Red Hat. We have a issue like this: We want to print from Linux, to a printer attached to a Windows machine. What we want to print is a PDF. It prints, but the printing starts from the middle of the page. In the report, there is no space at the top but still printing starts from the... (5 Replies)
Discussion started by: rohan69
5 Replies

7. UNIX for Dummies Questions & Answers

Sco Unix printing : jobs hangs in queue - printing via lp versus hpnpf

Hi, We have a Unix 3.2v5.0.5. I installed a printer via scoadmin, HP network printer manager with network peripheral name (hostname and ipadres are in /etc/hosts). This is the configuration file : Code: root@sco1 # cat configurationBanner: on:AlwaysContent types: simpleDevice:... (0 Replies)
Discussion started by: haezeban
0 Replies

8. Emergency UNIX and Linux Support

HP UX - ILO Console hostname different than Machine Hostname...

Hi All, So we added a new HP-UX 11.31 machine. Copied OS via Ignite-UX (DVD)over from this machine called machine_a. It was supposed to be named machine_c. And it is when you log in...however when I'm in the ILO console before logging in, it says: It should say: What gives? And how do... (4 Replies)
Discussion started by: zixzix01
4 Replies

9. UNIX for Advanced & Expert Users

Hostname -f hostname: Unknown host

deleted (0 Replies)
Discussion started by: hce
0 Replies

10. UNIX for Beginners Questions & Answers

Printing, SYSPRINTER, IP printing

Dear readers, We have a printer problem with a UNIX system. The OS is Unix IRIX 6.5 We have connected a printerto the system. If we then make a test print everything goes well . (IP printing) But if we make a print from the "orrga,i"program. Then we see all the printouts stuck within the... (3 Replies)
Discussion started by: SergevdH
3 Replies
GEOIP_CONTINENT_CODE_BY_NAME(3) 					 1					   GEOIP_CONTINENT_CODE_BY_NAME(3)

geoip_continent_code_by_name - Get the two letter continent code

SYNOPSIS
string geoip_continent_code_by_name (string $hostname) DESCRIPTION
The geoip_continent_code_by_name(3) function will return the two letter continent code corresponding to a hostname or an IP address. PARAMETERS
o $hostname - The hostname or IP address whose location is to be looked-up. RETURN VALUES
Returns the two letter continent code on success, or FALSE if the address cannot be found in the database. Continent codes +-----+----------------+ |Code | | | | | | | Continent name | | | | +-----+----------------+ | | | | AF | | | | | | | Africa | | | | | | | | AN | | | | | | | Antarctica | | | | | | | | AS | | | | | | | Asia | | | | | | | | EU | | | | | | | Europe | | | | | | | | NA | | | | | | | North america | | | | | | | | OC | | | | | | | Oceania | | | | | | | | SA | | | | | | | South america | | | | +-----+----------------+ EXAMPLES
Example #1 A geoip_continent_code_by_name(3) example This will print where the host example.com is located. <?php $continent = geoip_continent_code_by_name('www.example.com'); if ($continent) { echo 'This host is located in: ' . $continent; } ?> The above example will output: This host is located in: NA SEE ALSO
geoip_country_code_by_name(3). PHP Documentation Group GEOIP_CONTINENT_CODE_BY_NAME(3)
All times are GMT -4. The time now is 12:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy