05-29-2008
Note the backticks around the "hostname" ---- `hostname` this executes command in a sub-shell and returns the value to the parent one. The other way is, as you have been told, to use the HOSTNAME variable, which is set on every session, verify with : "env | grep -i hostname" - you will receieve : HOSTNAME=your.host.name
In script, just call the variable, as in : echo $HOSTNAME.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
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
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
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
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
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
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
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
deleted (0 Replies)
Discussion started by: hce
0 Replies
10. UNIX for Beginners Questions & Answers
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
dtest(1) USER COMMANDS dtest(1)
NAME
dtest - simple uDAPL send/receive and RDMA test
SYNOPSIS
dtest [-P provider] [-b buf size] [-B burst count][-v] [-c] [-p] [-d] [-s]
dtest [-P provider] [-b buf size] [-B burst count][-v] [-c] [-p] [-d] [-h HOSTNAME]
DESCRIPTION
dtest is a simple test used to exercise and verify the uDAPL interfaces. At least two instantiations of the test must be run. One acts as
the server and the other the client. The server side of the test, once invoked listens for connection requests, until timing out or killed.
Upon receipt of a cd connection request, the connection is established, the server and client sides exchange information necessary to per-
form RDMA writes and reads.
OPTIONS
-P=PROVIDER
use PROVIDER to specify uDAPL interface using /etc/dat.conf (default OpenIB-cma)
-b=BUFFER_SIZE
use buffer size BUFFER_SIZE for RDMA(default 64)
-B=BURST_COUNT
use busrt count BURST_COUNT for interations (default 10)
-v, verbose output(default off)
-c, use consumer notification events (default off)
-p, use polling (default wait for event)
-d, delay in seconds before close (default off)
-s, run as server (default - run as server)
-h=HOSTNAME
use HOSTNAME to specify server hostname or IP address (default - none)
EXAMPLES
dtest -P OpenIB-cma -v -s
Starts a server process with debug verbosity using provider OpenIB-cma.
dtest -P OpenIB-cma -h server1-ib0
Starts a client process, using OpenIB-cma provider to connect to hostname server1-ib0.
SEE ALSO
dapltest(1)
AUTHORS
Arlin Davis
<ardavis@ichips.intel.com>
BUGS
uDAPL 1.2 February 23, 2007 dtest(1)