In this line:
tr a A < /etc/hosts | sort -r |pr -d > /etc/hosts
what would be the expected outcome? I know lowercase 'a' would change to uppercase 'A' but what's next? Would the original file be overwritten since the redirect is to the same file name?