ls | bin |sort output.txt code example Example: sorting output bash # Use sort command input_text | sort # or input_text | sort -r # For reverse