From: Gerhard Thimm (gthimm@zbw.ch)
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: mulinux-unsubscribe@sunsite.auc.dk
> For additional commands, e-mail: mulinux-help@sunsite.auc.dk
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Gerhard Thimm <mailto:gthimm@zbw.ch> 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: mulinux-unsubscribe@sunsite.auc.dk For additional commands, e-mail: mulinux-help@sunsite.auc.dk
This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:13 CET