Can a bash script run two processes in one line?

56 Views Asked by At

I was wondering if there is any way of making both of these commands execute in the same line.

echo "Percentage: " ; pmset -g batt | grep -Eo "\d+%"

when I run this shell script it returs both fine, but in different lines.

Like this:

Percentage: 
81%

I tried all that I knew (again I'm starting out I'm a newb) I tried using ||, &&, |, and ;, as well.

0

There are 0 best solutions below