I have a mini-system with only limited number of binaries (bash,cp,cat,sed, ...). I don't have tail command, and I am wondering if I could emulate tail functionality with sed
cat foo.txt | tail -n 10 I know that I can print lines 1-10 with sed cat foo.txt | sed -n '1,10p', but how would I print the last 10 lines?