Re: why is grep behaving this way ?
-----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`" does not work !
>> WHY ?
>>
>
> Here's another workaround:
>
> NAME=`logname`;who|grep $NAME
Defensive programming!
NAME=`logname` && who|grep $NAME
>
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFF7GyVS9HxQb37XmcRAjCpAJ9HabvHbgRYDqmSo0wxUwMoN935pwCfWiGc
uSpLLw2HQrcz9XIxXRRrfsA=
=sSPG
-----END PGP SIGNATURE-----
Reply to: