spilit the list of files in set ls -1 *.dbf

Dear All,
Please help in this subject..
my requirement is list the files in directory and out of that list make the different set and each should set contains 10 files and assign to variable and start zipping in background. pick the second set files and same to be repeat the commands parallel.
i used ls -1 *.dbf | head -10 to get the first set. and start the zip using gzip.

kindly help me how can i get the next 10 files and assign to second variable.
Appreciated u r help in advance..
Madhu

You could pipe ls into the split(1) utility i.e

ls -l *.dbf | split -l 10

Hi fpmurphy,

it worked ... but it generates random file name... is there any way so i can specify file name with file1...file2.. file3... like.

Thanks in advance.
Madhu

check the split man page. you can put suffix/prefix