Wolph

Minimum, maximum, average and more – Useful little shell scripts

Just a collection of a bit of sh/bash/awk/zsh scripts to make your life in the shell easier 🙂

Over time I might add some more, but in the mean time don’t forget to checkout my Github Gists where a few of these are: Wolph’s gists

Also, my dotfiles collection could be useful here 🙂

Little script to do min/max/avg/total count for some given shell input:
[bash]#!/usr/bin/env awk -f
# “minmaxavg” shell script to calculate the minimum, maximum, average and count with awk
{
if(min==””)min=max=$1;
if($1>max)max=$1;
if($1 /dev/null; done 2>&1 | awk ‘{print $13}’ | minmaxavg
[/bash]

Exit mobile version