hi all

only the weirdest thing happened with me just now. I was debugging a shell script and I found that a step that was supposed to execute later ws getting executed prior to another step for no reason. You know any ?

i mean have a look at the following command-
[if $DISPLAY xstatus | $GREP "$right...$right" ]

here it tries to grep first(and hence gives an ambiguous output) and later displays the xstatus.(It should do the opposite,right?)

also any idea what the command which frsh does ? it gives no output on my system. But it sure does something.

Your valuable inputs are always welcome



[ is an alias for test, it's useless here.

try this way:

if $DISPLAY xstatus | grep "$right...$right"
then echo ok
else echo ko

and man which to know what does which frsh


thanks for the reply.
if $DISPLAY xstatus | grep "$right...$right" also gives the same problem
any ideas ? :/


what does xstatus' print? and what should grep keep of it?

status of some policy(thats a definite output,no issues there) .. and grep searches the value 11...12

again what does xstatus print?
how am I supposed to find what's wrong without any input?

from my crystal ball:

xstatus | grep '11\.\.\.12'


DISPLAY=$DISPLAY xstatus | grep '11\.\.\.12'

though DISPLAY=$DISPLAY doesn't make much sense :(

then we'll try to find out what you want if to do.