View Single Post
Old 2020-05-27, 12:45   #370
kruoli
 
kruoli's Avatar
 
"Oliver"
Sep 2017
Porta Westfalica, DE

3·83 Posts
Lightbulb Pretty-printing version

This will pad the first column with whitespaces according to the largest factor.
Code:
grep has results.txt | cut -d' ' -f3,7 | sort | uniq | sed 's/\(.\+\) \(.\+\)/\2 | \1/' | xargs -n 3 printf "%-$(grep has results.txt | cut -d' ' -f7 | sort -n | tail -n1 | wc -m)s%s %s\n"
kruoli is online now   Reply With Quote