Yesterday a situation arose when someone needed me to select the end of the file, indicated as everything after a certain line (for the sake of the argument, "FOO"). I needed to do this immediately, so I went with an option that I knew would work, and ignored the "Right Way" or "Best Way", and went with the following:
grep -n FOO FILE.TXT | cut -f1 -d":" | xargs -I{} tail -n +{} FILE.TXT > NEWFILE.TXT
What bothered me was the use of xargs for a singleton value. I thought I could roll my Google-Fu on this, but I was interested to know what things people in SO-land came up with for this situation.
source share