I have a folder that has 2800 .txt files in it and I need to delete the first line of every files. The names of the files are all different except for that fact that they end with .txt .
would it be possible to do that while keeping the same file name (instead of sending the output (file without the first line) to another file)...
You could do a bash script. Something like this:
The run it from command line:
$ <script_file.sh>
Take this with a grain of salt. I'm not actually running on a *nix machine. See here for a variety of ways of deleting the first line of a file. Also note that
tail
is supposed to be much faster thansed
, if performance is important to you.