The sys admin's daily grind – Prettyping and Asciiflow
Block Heroes

Columnist Charly is delighted that people still program useful tools for the terminal. Here, he looks at one tool that transforms boring ping data into colorful statistics and another that publishes a construction set for ASCII graphics on the network.
One weapon for command-line warriors is Prettyping [1], a shell script that wraps around the ping command. It reads its tasks, keeps a record of run times and packet losses, and shows at the command line in block graphics the average values since starting the tool and for the past 60 seconds (Figure 1).

The script runs on any system with Bash and Awk (i.e., also on OS X and probably also in the new Linux environment on Windows 10). Prettyping detects whether it is running in a terminal and how wide the terminal is, then scales the output accordingly. If you think the output is a little too clownish, you can switch to a more staid monochrome display using --nocolor
. Prettyping passes on to ping any parameters that it isn't familiar with.
[...]
Buy this article as PDF
(incl. VAT)