awk is so much better than sed to learn given its ability, the only unix tool it doesn't replace is tr and tail, but other than that, you can use it instead of grep, cut, sed, head.
cat /etc/passwd | \
awk -v n=10 '{ lines[NR] = $0 }
END{
for (i = NR - n + 1; i <= NR; i++)
if (i > 0) print lines[i]
}'And there's also tail -f, how would you go about doing that? a while loop that sleeps and reopens the file? yuck