Hands-on task
sed: reverse the order of lines
Reverse the order of lines in the file /root/in.txt (the last line becomes the first, like tac does) and write the result to /root/out.txt. The goal is to do it in sed via the hold space; keep tac for checking yourself.
- sed
- hold space
- pattern space
- sed -n
- address of the last line