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

~cheers

hi,

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

try this way:

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

and man which to know what does which frsh

hi

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

~cheers

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'

or

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.