! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Command using pipe doesn't work
Status:
RESOLVED: WONTFIX
Product:
Xfce4-genmon-plugin
Component:
General

Comments

Description dgentikian 2009-02-05 18:51:16 CET
I recently dicover the genmon plugin, when i try the command line :

uptime | awk {'print $10'} | sed 's/,//g'

The plugin don't works and shows "xxx" instead of the uptime like "0.30"
If i create a Shell script name script.sh with : 

#/bin/bash

uptime | awk {'print $10'} | sed 's/,//g'

And insert the script in the plugin's command line, it works well.
Comment 1 Mike Massonnet editbugs 2009-02-05 21:58:38 CET
That's because the command in the properties dialog is not a sub-shell or shell.  Genmon is written with the spirit to use scripts, you can find several script examples in the source directory and on the goodies wiki page.
Comment 2 Florian Rivoal editbugs 2011-02-26 11:01:58 CET
As mike said, genmon doesn't try to behave like a shell, so this kind of niceties provided by a shell are not available. To get them, you have to write a script.
Comment 3 Mike Massonnet editbugs 2011-02-26 13:13:12 CET
I had also like to specify, if you do a mistake you won't get any error messages, and basically you can screw your system.

For shell related commands, prefer a script or a terminal.

Bug #4909

Reported by:
dgentikian
Reported on: 2009-02-05
Last modified on: 2011-02-26

People

Assignee:
Florian Rivoal
CC List:
1 user

Version

Version:
3.2 or older

Attachments

Additional information