4 ms·
You use the "zero or more" * operator, which will match empty strings in front of the "%". But an empty string cannot be converted to a float. Just use the "at
by nojhan 13y ago
You use the "zero or more" * operator, which will match empty strings in front of the "%". But an empty string cannot be converted to a float. Just use the "at least one" operator: +. Also, the scale is 0,100 by default, you can omit it.
df -h | colout "([0-9]+)%" scale
- Fuzzwah 13y agoThanks for the response. My lazy regex makes me feel bad.