On Fri, Dec 23, 2011 at 3:01 PM, Adam Spiers <vcs-h...@adamspiers.org> wrote:
> In the USB case, it's as simple as:
>    shorthost="${HOST%%.*}"

Sorry, one of these two might work better depending on your OS and


    shorthost=`hostname -s`

Careful with that last one on non-Linux UNIX machines though.  In a
previous job, years ago when I was still (ahem) naive and
inexperienced, I once accidentally ran that in parallel on several
hundred production Solaris machines, which resulted in setting all
their hostnames to '-s'.  Oops :)  I think I realised my error and
changed them back quick enough to avoid triggering too many alarm
bells though.
vcs-home mailing list

Reply via email to