0

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

2
Contributors
5
Replies
21
Views
4 Years
Discussion Span
Last Post by Watael
0

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

0

hi

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

~cheers

0

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

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.