[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-developers] Command to fetch the sitenumber based on domain?
- Subject: Re: [cobalt-developers] Command to fetch the sitenumber based on domain?
- From: Albert Croft <acroft@xxxxxxxxxxxxxxxx>
- Date: Thu Feb 22 22:35:16 2001
- List-id: Discussion Forum for developers on Cobalt Networks products <cobalt-developers.list.cobalt.com>
I don't know of a command to do it native to the cobalt, but the
following perl script seems to do the trick. There may be other ways,
however.
-----
#!/usr/bin/perl
$base = "/home/sites/";
chdir($base);
my $dir = readlink($ARGV[0]);
$dir =~ s!$base!!;
print $dir, "\n";
-----
--
-Albert Croft
-----
Current (electronic) contact information
Email: acroft@xxxxxxxxxxxxxxxx
WWW: http://www.tyler.net/acroft
ICQ UIN: 710904 (icq available from www.mirabilis.com)
> Message: 3
> From: "Kevin Howe"
> To: "Cobalt Mailing List"
> Date: Wed, 21 Feb 2001 15:23:51 -0400
> Subject: [cobalt-developers] Command to fetch the sitenumber based on domain?
> Reply-To: cobalt-developers@xxxxxxxxxxxxxxx
>
> Do RAQ's have a command which fetches the a site's number based on domain?
> Something like the following:
>
> % sitenum www.domain.com
> >site6
>
> In other words, the domain www.domain.com is actually "site6" on the RAQ.
>
> Much appreciated,
> Kevin
>