1#!/bin/sh 2 3while [ $# != 0 ]; do 4 ( grep '^#' $1; grep -v '^#' $1 | LC_ALL=C sort ) > $1.tmp 5 mv $1.tmp $1 6 shift 7done 8