Hello, all,
Thanks to all the response except one complaim about my question.
It is too many to list individually here. Thanks, you wonderful guys.
The answer is simple, I believe I got first answer within a half hour. I need
put double quotation on :
`rsh host-name finger | grep console`
so, now everyone know I am not a frequently shell programmer.
Thanks!
Feng
Feng Qiu wrote:
> Hello, all,
> I try to write a script to test if someone login from console:
>
> if test `rsh host-name finger | grep console` != ""
> then
> dosomething
> else
> echo "NOBODY"
> fi
>
> I cannot make it work, anyone know what is wrong?
>
> Thanks!
S
U BEFORE POSTING please READ the FAQ located at
N ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/faq
. and the list POLICY statement located at
M ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/policy
A To submit questions/summaries to this list send your email message to:
N sun-managers@ececs.uc.edu
A To unsubscribe from this list please send an email message to:
G majordomo@sunmanagers.ececs.uc.edu
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:
I http://www.latech.edu/sunman.html
S
T
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:16 CDT