Subject: Getting output from FvwmCommand in a shell script

From: Marcus Lundblad <[email-masked]>
Date: Tue, 11 Feb 2003 23:35:08 +0100 (CET)

I'm writing a shell script to test the geometry styles and conditions.

I have the following function in my script:

TestCondition()
{
    condition="$1"
    off=0
    if [ "$2" = "off" ]; then
	echo "negative cond"
	off=1
    fi
    
    if [ $off = "0" ]; then	
	result=`FvwmCommand "All ('Test window' $condition) echo 'match'"`
    else      
	result=`FvwmCommand "All ('Test window' \!$condition) echo
'match'"`
    fi
    
    echo $result
    if [ -z "$result" ]; then
	return 0
    else
	return 1
    fi
}

But the variable $result is always set to an empty string.

I see output in the shell like this:

[FVWM][Echo]: 'match'

Does the Echo command write to Fvwm's standard error?

//Marcus

--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dan Espen <[email-masked]>
Date: Tue, 11 Feb 2003 17:56:04 -0500

> 	result=`FvwmCommand "All ('Test window' \!$condition) echo

I think you need:

FvwmCommand -i0

but right now, I can't get FvwmCommand to give me any output.

> Does the Echo command write to Fvwm's standard error?

      Echo string
              Prints a  message  to  stderr.   Potentially
              useful   for   debugging   things   in  your
              .fvwm2rc.

-- 
Dan Espen                           E-mail: [email-masked]