From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh Users <zsh-users@sunsite.dk>
Subject: Re: how do I find my IP address?
Date: Sun, 13 Jun 2004 21:13:03 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.44.0406132056150.32342-100000@toltec.zanshin.com> (raw)
In-Reply-To: <BCF27033.2268%lists@tntluoma.com>
On Sun, 13 Jun 2004, Timothy Luoma wrote:
> This may seem like a dumb question, but how can I get my computer's IP
There are a number of possibilities. If $HOST is set to a FQDN, the
simplest might be
$(dig +short $HOST 2>/dev/null)
or
${$(host $HOST 2>/dev/null)[-1]}
or
${$(nslookup $HOST 2>/dev/null)[-1]}
If $HOST is not set properly, try $(hostname -f) or $(hostname --long).
If all else fails:
${${${(M)=${(f)"$(telnet $HOST </dev/null 2>&1)"}:#Trying*}[2]}%...*}
prev parent reply other threads:[~2004-06-14 4:14 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-14 0:57 Timothy Luoma
2004-06-14 4:13 ` Bart Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.44.0406132056150.32342-100000@toltec.zanshin.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).