#!/bin/bash

Readable scripts vs. One liners

Recently, I had this file which contains some {start,end} times
and I wanted to calculate the total amount of time. This script
contains two methods to process it: one long and slow version which is perfectly readable
and a one liner which is much faster, but a bit harder to understand. You should always
try to come up with a short and fast solution for your scripts, because you just write
them once, but run them often. Long scripts may be more readable, but with a few
comments the one liner solution is always better.
Sample output: