zsh-users
 help / color / mirror / code / Atom feed
From: Timothy Luoma <lists@tntluoma.com>
To: William Scott <wgscott@chemistry.ucsc.edu>
Cc: <zsh-users@sunsite.dk>
Subject: Re: how do I find my IP address
Date: Sun, 13 Jun 2004 23:57:10 -0400	[thread overview]
Message-ID: <BCF29A56.2273%lists@tntluoma.com> (raw)
In-Reply-To: <67BDB808-BDA2-11D8-9044-000A957D73C4@chemistry.ucsc.edu>

On 6/13/04 9:30 PM, "William Scott" <wgscott@chemistry.ucsc.edu> wrote:

> If you are running a computer with an ip address that changes
> (dynamically allocated), this will work, although it is kind of ugly:
> 
> define an alias such as:
> 
> alias myip="curl -s http://www.showmyip.com/simple/ | awk '{print $1}'
> "

Ah, no good.  This shows my public IP address (the official internet IP
given to me by my ISP when I am dialed up).

[My apologies for being too vague.  I hope I haven't wasted anyone's time]

> If you have a static ip address, you should only have to figure this
> out once. 

I'm actually on two private LANs (one home and one work)... home uses
10.x.x.x and work uses 192.168.x.x but they are both given out via DHCP.


Right now the ugly hack I have is this:

    ifconfig en1 | fgrep 'inet ' | awk '{print $2}'

which works for the Mac, but it would have to be

    ifconfig eth0 | fgrep 'inet ' | awk '{print $2}' |\
    sed 's/addr://'

on Fedora, and possibly even something ELSE for FreeBSD.  Obviously less
than ideal to have to keep hacking several different ways of doing this, but
if that's the only way...


> On Mac OS X you can find this in the System Preferences
> under file sharing or network settings (I am assuming this on the basis
> of the Micro$oft email stamp at the bottom of your email.)

Ah yes, sorry about that.  I saved about $340USD by waiting for Office:2004
to hit the Microsoft employee store, so I've been using the demo version
while waiting.  I should have an official copy soon (aside: I've never liked
Word or Office but Office:Mac 2004 is quite nice).

[no, I'm not an MS employee, but a friend of mine is]

Anyway, I'm running zsh on Fedora, FreeBSD, and Mac OSX. (I actually just
got my old Dell 7500 setup to dual boot XP/Fedora/FreeBSD today, which is
what prompted the question.  I'm all of a sudden going to need/want to know
several bits of information which I haven't needed to know before.

The real challenge is going to be to see if I can write one .zshrc which I
can use on all my difference zsh shell accounts by use of conditional
statements.

> This alias and a whole bunch of stuff that is useful for OS X zsh is
> distributed by Gary Kerbaugh.  I have links to it and a few of my own
> zsh functions here:  http://tinyurl.com/3373b

Cool, will check it out.

Thanks

TjL

Sent using the Microsoft Entourage 2004 for Mac Test Drive.



      parent reply	other threads:[~2004-06-14  3:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-14  1:30 William Scott
2004-06-14  3:37 ` Jason Price
2004-06-14 10:58   ` Jussi Pakkanen
2004-06-14 11:57   ` Vincent Lefevre
2004-06-14 12:23     ` James Devenish
2004-06-14 13:18       ` Vincent Lefevre
2004-06-14  3:57 ` Timothy Luoma [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=BCF29A56.2273%lists@tntluoma.com \
    --to=lists@tntluoma.com \
    --cc=wgscott@chemistry.ucsc.edu \
    --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).