reverse lines bash code example Example 1: reverse the order of lines in bash tail -r myfile.txt Example 2: shell reverse lines tail -r file.txt