Tag Info

New answers tagged

2

Method #1 - Using head & tail You can use the command head to pull out the first 40 files from a file listing like so: $ head -40 input_files | xargs ... To get the next 40: $ tail -n +41 input_file | head -40 | xargs ... ... $ tail -n +161 input_file | head -40 | xargs ... You can keep walking down the list, 40 at a time using this same ...


3

This is a perfect recipe for xargs: cat list_of_files | xargs -n 40 command Quoting from man xargs: -n number Set the maximum number of arguments taken from standard input for each invocation of the utility. An invocation of utility will use less than number standard input arguments if the number of bytes ...



Top 50 recent answers are included