On 16 May 2004 23:06:47 -0400, Parv wrote:
> 
> in message <[EMAIL PROTECTED]>,
> wrote [EMAIL PROTECTED] thusly...
> >
> >  + I PipeRead `ps x|grep Fvwm|sed -e
> > "s/\\(.*\\)\\/\\(Fvwm[a-zA-Z]\\+\\).*/AddToMenu ModuleList \\2 KillModule
> > \\2/"|sort|uniq`
> > 
> > However, the PipeRead command stream is rendered as:
> > ``28876 ?        R      0:00 sh -c ps x|grep Fvwm|sed -e
> > "s/\(.*\)\/\(Fvwm[a-zA-Z]\+\).*/AddToMenu ModuleList \2 KillModule
> > \2/"|sort|uniq"
> 
> Notice that you are using ``, to execute a command in subshell
> instead of '' which may or may not matter to fvwm. Try with '' or ""
> instead of `` in any case.

Parv, why not just open FvwmConsole and verify your (wrong) theory? :)

Ok, let's analyze the situation. Suppose we all have GNU tools and this
command (pasted from the top of this message) indeed generates the menu:

  % ps x|grep Fvwm|sed -e "s/\\(.*\\)\\/\\(Fvwm[a-zA-Z]\\+\\).*/AddToMenu 
ModuleList \\2 KillModule \\2/"|sort|uniq

First, the choice of double quotes cause you double backslashes,
this is needless. Rewrite this shell command using a single quote:

  % ps x|grep Fvwm|sed -e 's/\(.*\)\/\(Fvwm[a-zA-Z]\+\).*/AddToMenu ModuleList 
\2 KillModule \2/'|sort|uniq

Now, you have 2 choices. First, to try to insert one of these commands
into PipeRead. To do this, you should escape all backslash using another
backspace (or maybe even replace each backslash with 4 backspaces, yes).
Dollars should sometimes be escaped too. You may play with it until you
get it correctly.

Another (preferable) choice is to create ~/bin/fvwm-menu-mymodulelist
script that contains our single line and just call it:

  + I PipeRead `fvwm-menu-mymodulelist`

Regards,
Mikhael.
--
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 [EMAIL PROTECTED]
To report problems, send mail to [EMAIL PROTECTED]

Reply via email to