Yes,
There are lots of alternatives
like :
who | grep `id -un`
who | grep bhasker
or even i tried to do this !!!
who a
grep `logname` a
that WORKS
ONLY this command who | grep `logname` does not work !
WHY ?
Here's another workaround:
NAME=`logname`;who|grep $NAME
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 03/05/07 12:47, Kevin Ross wrote:
Yes,
There are lots of alternatives
like :
who | grep `id -un`
who | grep bhasker
or even i tried to do this !!!
who a
grep `logname` a
that WORKS
ONLY this command who | grep `logname`
I have logname command give me this output
[EMAIL PROTECTED] ~]$ logname
bhaskerv
and say i execute this command
[EMAIL PROTECTED] ~]$ echo `logname`
bhaskerv
till this it is all fine
BUT
[EMAIL PROTECTED] ~]$ who | grep `logname`
logname: no login name
Usage: grep [OPTION]... PATTERN
On Fri, Mar 02, 2007 at 03:07:37PM +0530, Bhasker C V wrote:
[EMAIL PROTECTED] ~]$ who | grep `logname`
logname: no login name
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
Weird. Consiedering that this works:
who | grep `whoami`
Where's the catch?
--
Salvatore Iovene wrote:
On Fri, Mar 02, 2007 at 03:07:37PM +0530, Bhasker C V wrote:
[EMAIL PROTECTED] ~]$ who | grep `logname`
logname: no login name
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
Weird. Consiedering that this works:
who |
On Fri, Mar 02, 2007 at 03:07:37PM +0530, Bhasker C V wrote:
[EMAIL PROTECTED] ~]$ who | grep `logname`
logname: no login name
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
On 02.03.07 11:27, H?kon Alstadheim wrote:
I'm running SuSE, and can
On 3/2/07, Matus UHLAR - fantomas [EMAIL PROTECTED] wrote:
I'd say that logname detects logged user by checking terminal of stdin file
handle...
Yup:
$ echo | strace -o'|grep readlink' logname
readlink(/proc/self/fd/0, pipe:[5242235], 511) = 14
$ strace -o'|grep readlink' logname
Yes,
There are lots of alternatives
like :
who | grep `id -un`
who | grep bhasker
or even i tried to do this !!!
who a
grep `logname` a
that WORKS
ONLY this command who | grep `logname` does not work !
WHY ?
On Fri, 2007-03-02 at 12:16 +0200, Salvatore Iovene wrote:
On Fri, Mar
Bhasker C V wrote:
Yes,
There are lots of alternatives
like :
who | grep `id -un`
who | grep bhasker
or even i tried to do this !!!
who a
grep `logname` a
that WORKS
ONLY this command who | grep `logname` does not work !
WHY ?
Most likely because logname misbehaves when stdin
On Fri, Mar 02, 2007 at 04:37:37AM EST, Bhasker C V wrote:
I have logname command give me this output
[EMAIL PROTECTED] ~]$ logname
bhaskerv
and say i execute this command
[EMAIL PROTECTED] ~]$ echo `logname`
bhaskerv
till this it is all fine
BUT
[EMAIL
10 matches
Mail list logo