#!/usr/bin/env bash set -euo pipefail cat input.txt | awk '{ print length, $0 }' | sort -n | cut -d" " -f2-