PowerShell:
function Sort-File ($Path, $Destination) {
Get-Content $Path | Sort-Object | Out-File $Destination
}
Granted, shells are probably at an advantage when it comes to file management. I'd think a bash variant would be quite short as well.Aiming for succinctness by using aliases and using redirection instead of cmdlets for writing the file (shorter, but less flexible):
function sf { gc $args[0] | sort > $args[1] }
That's not code anyone should write outside code golfing, though ;-)