sort

File Read

sort -m /path/to/input-file

File Write

echo DATA | sort -m -o /path/to/output-file