[lug] Converting IPs to Domain Names and Vice Versa via Bash

David Morris lists at morris-clan.net
Wed Jan 26 22:08:14 MST 2005


On Wed, Jan 26, 2005 at 09:27:33PM -0700, David Anselmi wrote:
> It's a tradition worth sticking to.  I'd have thought CS
> people would take this for granted but I tend to see it
> done wrong.
> 
> Typically when naming things you put the most general part
> to the right. That's the way fw1.cellularonewest.com is,
> and also 3.140.212.65.in-addr.arpa.  In both, the host
> specific piece is left-most.

I can see the argument for there and it makes sense.  I just
prefer the most general part first as computers sort just
about everything from left-to-right.  To use an example I
deal with regularly, take a set of 1000 files named by date
in which you have to find one file you know the approximate
(but not exact) creation date of.

While in an ideal world it would work better to put the year
last then sort intelligently from right-to-left on the
year/month/day/hour/minute/second, the reality of computers
is that can be a task anywhere from annoying to impossible
to implement generically.

Thus, in the real world I, at least, prefer the most general
part of anything to be left-most.  It just makes life that
much simpler.

Or perhaps I'm just a weirdo. =)

--David




More information about the LUG mailing list