#!/bin/nawk -f { command = "sort -n "$1" > tempfile" if (!system (command)) { command = "mv tempfile "$1 if (!system (command)) print $1 " sorted" } }