#!/bin/sh head -n 1 $1 > $1.ord tail -n +2 $1 | sort -d >>$1.ord mv $1.ord $1