Remove the leading spaces of the output from the command “uniq”

If you want to remove the leading spaces, just pipe the output to sed to do so: uniq -c file | sed 's/^\s*//' Example: $ uniq -c file 2 00 2 01 2 00 2 02 1 03 3 aa $ uniq -c file | sed 's/^\s*//' 2 00 2 01 2 00 2 02 1 03 3 aa Share this:Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window)Click to share on LinkedIn (Opens in new window)Click to email this to a friend (Opens in new window)

(debian stretch) ps: command not found

Error: ps: command not found Fix: apt-get update && apt-get install -y procps   Share this:Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window)Click to share on LinkedIn (Opens in new window)Click to email this to a friend (Opens in new window)