News for hackers. Stuff that matters.
Re:Colout – add colors to a text stream in your terminal by nojhan on Friday June 07, 2013 @04:15AM (#5837835)
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
Re:Colout – add colors to a text stream in your terminal by Fuzzwah on Friday June 07, 2013 @06:20PM (#5842411)
Thanks for the response. My lazy regex makes me feel bad.