spliting a text file into several parts by line count
I have a utility that works with files. The utility is crashing at after about 120 files. The input to the utility is a file containing a filelist. I want to cut the file with the file names in it to seperate files containing about one hundred or so.
My thought was to determine the number of lines/100 and then use head and delete to create temporary files to run the utility multiple times to prevent the crash.
When I tried to create a variable using the wc -l command the output gives me the number of total lines but it also includes the filename of the input file. ( 873 Filename.txt ) I can not figure out how to remove the Filename.txt from the variable.
Any suggestions to any or all of this would be greatly appreciated.
Thanks
Chris
|