Nugget2468
Nugget2468

Reputation: 31

MATE Command Applet - '#' being shown instead of output

I'm using the Command Applet 1.16.0 in MATE to run a bash command -

upower -d | grep -m1 "percentage" | awk '{print $2}'

Instead of showing the output I see in the terminal (battery percentage), it just shows a #

Can I not pipe commands in this applet, or am I doing something wrong?

Upvotes: 3

Views: 616

Answers (1)

Animesh D
Animesh D

Reputation: 5002

You can do it like this:

bash -c "upower -d | grep -m1 "percentage" | awk '{print $2}'".

Source

Upvotes: 1

Related Questions