As a caveat, sometimes the 'who am i' will return something more along the
lines of:
<username>!<host> pts .........
such that the awk solution may or may not work...
Might think to awk or cut the line, and then a sed to be sure to get just
the username...
Carl
On Mon, 16 Feb 2004, Tommy McNeely wrote:
> On Sun, 08 Feb 2004 15:34:01 +0000, Andy Fiddaman wrote:
>
> > Probably worth mentioning at this point that the 'whoami' utility isn't
> > standard in core solaris either, that needs the SUNWscpu (SunOS 4.x
> > compatibility utilities) - "who am i | awk '{print$1}'" does the same
> > though.
> >
> > Andy
> >
> > [EMAIL PROTECTED] clamav-0.67]# who am i
> tommy pts/2 Jan 29 14:56 (pickles)
> [EMAIL PROTECTED] clamav-0.67]# /usr/ucb/whoami
> root
>
>
>
> Just thought I would mention that "whoami" and "who am i" are not quite
> the same... its better to do something like "id | grep -c root" .. but
> even that can be thrown off
>
> Tommy
>
>
>
> -------------------------------------------------------
> SF.Net is sponsored by: Speed Start Your Linux Apps Now.
> Build and deploy apps & Web services for Linux with
> a free DVD software kit from IBM. Click Now!
> http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
> _______________________________________________
> Clamav-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/clamav-users
>
- --
"There are 10 types of people in the world: Those who understand binary
and those that don't."
$>whoami: Carl Holtje
$>mail holtje: [EMAIL PROTECTED]
$>cu: http://www.cs.rit.edu/~cwh0803
$>whois holtje:
System Administrator Group
Computer Science Department
Rochester Institute of Technology
$>
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Clamav-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/clamav-users