FVWM: question: Fvwm and Awk: more $1 expansion trouble

From: Neil Zanella <nzanella_at_cs.mun.ca>
Date: Sat, 27 Jan 2001 22:52:16 -0330 (NST)

Hello,

I am trying to have fvwm2 process the following from a config file
but I am having some difficulties with the variables $1, $2, and $3.

The command is:

/usr/X11R6/bin/xterm -e /bin/sh -c (/usr/X11R6/bin/showrgb | /bin/awk '{
 printf("#%02X%02X%02X\t", $1, $2, $3); for (i = 4; i <= NF; i++)
 printf " " $i; print "" }' | /usr/bin/less)

(the parentheses are not working outside fvwm for some reason so you can
enter the above without parentheses at a shell prompt and have no less)

Note: the following works from a shell prompt (all one one line):

/usr/X11R6/bin/showrgb | /bin/awk '{
 printf("#%02X%02X%02X\t", $1, $2, $3); for (i = 4; i <= NF; i++)
printf " " $i; print "" }' | /usr/bin/less

Now I tried the following and a few other things but
they did not work (although the $i works fine)...

[snip]

+ "RGB" "I" Exec /usr/X11R6/bin/xterm-e /bin/sh -c
"(/usr/X11R6/bin/showrgb | /bin/awk '{ printf(\"#%02X%02X%02X\t\", $$$$1,
$$$$2, $$$$3); for (i = 4; i <= NF; i++) printf \" \" \$i; print \"\" }' |
/usr/bin/less)"

[snip]

Could someone please point what went wrong?

Thanks!

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Sat Jan 27 2001 - 20:21:39 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:51 BST