Shell Interview Questions and Answers
Use sed command to replace the content of the file (emulate tac command)
if cat file1
Then O/p should be
sed '1! G; h;$!d' file1
Here G command appends to the pattern space,
h command copies pattern buffer to hold buffer
and d command deletes the current pattern space.