#!/bin/sh ( for i in `cat` ; do if [ "$i" -gt 0 -o "$i" -lt 0 ]; then echo $i else echo $i fi done ) | sort -n