Re: :) Missing command ;(

From: Gerhard Thimm ([email protected])
Date: Fri Apr 07 2000 - 09:14:13 CEST


Jochen Cichon schrieb:
>
> Hi,
>
> the installed muLinux works fine, and I use it for teaching some friends
> ind Linux. (Because it's so small they can install on their machines
> without new harddisk!)
>
> And there are some nice Programs missing WHOAMI, HOSTNAME
> sure they are really tiny, but also usefull ?!
>
> # WHOAMI
> set |grep USER|sed s/USER=//

nice pipe, but try also
set | grep USER | cut -d= -f 2

grep selects rows and cut selects columns (field 2 delimited by = in
this case) :-)
but shorter and faster is:
echo $USER

>
> # HOSTNAME
> set|grep HOSTNAME|sed s/HOSTNAME=//

or
echo $HOSTNAME

>
> BYE. Jochen
>
> PS: Even more usefull if you are accessing more than one Computer.

Tried it only on a not mulinux-box :-( but think should also work on
mulinux.
Gerhard

>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Gerhard Thimm        <mailto:[email protected]>
Informatiker, Kursleiter Informatikfachmann
ZbW - Zentrum fuer berufliche Weiterbildung
Gaiserwaldstrasse 6
CH-9015 St. Gallen
Telefon: (41) (0)71 / 313 40 40
Direkt:  (41) (0)71 / 313 40 53
FAX:     (41) (0)71 / 313 40 00 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:13 CET