[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-developers] Command to fetch the sitenumber based on domain?



On Wed, 21 Feb 2001, Kevin Howe wrote:

> 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

Try this:
---------
$ ls -l sitenum
-rwxrwxr-x   1 mlarocqu home           39 Feb 21 15:45 sitenum
$ cat sitenum
ls -l /home/sites/$1 | cut -d "/" -f 7
$ ./sitenum www.domain.com
site2
$ 
--------

Carpe viam,
Mike