This question already has an answer here:
I'm attempting to run multiple commands on the same line for multiple files. I have little experience with Linux and I've run into an issue with this command:
tail -n +3 "/usr/local/tmp/csce215/election2008/"*/*.csv | head -n -1 > polls.csv
I'm attempting to get the "middle section" of each file by using tail and head in succession. Unfortunately, tail runs for each file correctly, but head only seems to run for the very last file. Is this possible to do in one command, or is there a better method for doing this? I'd preferably like to use head and tail.