******************************************************************
* Do not Cc: me, because I am on THIS list, if I write here      *
* Keine Cc: an mich, bin auf DIESER Liste wenn ich hier schreibe *
******************************************************************

Hello,

I have following variables in my config:

    SetEnv XTERM_log1 "`date +%Y%m%d_%H%M%S`"
    SetEnv XTERM_log2 "`hostname -a |tr -d ' '`"
    SetEnv XTERM_log3 "`echo $[DISPLAY] |sed 's/\..*//'`"

and if I open a XTermand do a

    env |grep XTERM

I get

    XTERM_log1=`date +%Y%m%d_%H%M%S`
    XTERM_log2=`hostname -a |tr -d " "`
    XTERM_log3=`echo ":1.0" |sed "s/..*//"`

My first question now is:  Why are the Variables are NOT expanded?

Now, if I continue with

    SetEnv XTERM_log  "-l -lf 
$[HOME]/log/xterm/$[XTERM_log1]-$[XTERM_log2]$[XTERM_log3].log"

it looks like

    XTERM_log=-l -lf /home/michelle.konzack/log/xterm/`date 
+%Y%m%d_%H%M%S`-`hostname -a |tr -d " "``echo ":1.0" |sed "s/..*//"`.log

Why is this?  If I se such things, I expect, the varianbles are expanded
as they are used, which mean, if for example the hostname has changed,
it use automaticaly the NEW one.

OK I use the Variable $[XTERM_log] form a ButtonMenu as

        exec xterm $[XTERM_log]

The string should produce something like

    ~/log/xterm/20060930_112712-devel.private:1.log

but it does not. $[XTERM_log3] is alwas missing. So

    SetEnv XTERM_log3 "`echo $[DISPLAY] |sed s/\..*//`"

is not working, but on the commandline as

    echo $[DISPLAY] |sed s/\..*//

OK, it seems the Shell is eating my \ and I changed it to

    SetEnv XTERM_log3 "`echo $[DISPLAY] |sed 's/\\..*//'`"

which output

    XTERM_log=-l -lf /home/michelle.konzack/log/xterm/`date 
+%Y%m%d_%H%M%S`-`hostname -a |tr -d " "``echo ":1.0" |sed "s/..*//"`.log

OK more backslashes again:

    SetEnv XTERM_log3 "`echo $[DISPLAY] |sed 's/\\\\..*//'`"

and now it output

    XTERM_log=-l -lf /home/michelle.konzack/log/xterm/`date 
+%Y%m%d_%H%M%S`-`hostname -a |tr -d " "``echo ":1.0" |sed "s/\..*//"`.log

but it fails too.

It seems this is a Bug in fvwm?

I need this construct, since I do not want to have a DISPLAY of ":X.Y".

fvwm:
  Installiert:1:2.5.17-1
  Mögliche Pakete:1:2.5.17-1
  Versions-Tabelle:
 *** 1:2.5.17-1 0
       1000 http://sid.debian.tamay-dogan.net sid/main Packages
        100 /var/lib/dpkg/status

Greetings
    Michelle Konzack


-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
##################### Debian GNU/Linux Consultant #####################
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/6/61925193    67100 Strasbourg/France   IRC #Debian (irc.icq.com)


Reply via email to