[Cialug] bash return values [was: enter passwords less]

Chris Freeman cwfreeman at gmail.com
Mon Aug 27 09:26:50 CDT 2007


On 8/27/07, Nathan Stien <nathanism at gmail.com> wrote:
>
> On 8/27/07, Chris Freeman <cwfreeman at gmail.com> wrote:
> > Because I've got accounts on so many systems. It's not the most obvious
> > name, but it's what I was using on the machine I was typing on, so it
> got
> > into the example.
>
> I suggest $HOSTNAME, so it can be the same on every box.


This is a very good point. In looking into the $HOSTNAME variables on
systems I frequent, some of them use very long names or no $HOSTNAME (this
on one particular AIX box). In that case, I could use `hostname` or `uname
-h`.

But it's mostly an academic issue. I do very little admin work, so the
context (at work, at home, putty, X, etc) is almost always enough. When it
isn't, I put in a tag like "HOME", "LAPTOP", or "TEST" which I then ignore
while typing "rm -rf /". :-)

Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cialug.org/pipermail/cialug/attachments/20070827/6ed31207/attachment.htm


More information about the Cialug mailing list