csplit problem....please help me

Dear Friends,
please help me.

I am using csplit to split the files,
i.e.,
csplit -f filetype_ -n 3 filename '/regexpn/' {5}
which will split file "filename" into 5 subfiles
filetype_000
filetype_001
filetype_002
filetype_003
filetype_004

but if I run the csplit commad again it will rewrite the previous subfiles.
What I need is to continue with existing files
i.e., if I run the csplit command,
it should continue to split files and produce follwoing subfiles
filetype_005
filetype_006
filetype_007
filetype_008
filetype_009

do not affecting
filetype_000
filetype_001
filetype_002
filetype_003
filetype_004

and finally I should have
filetype_000
filetype_001
filetype_002
filetype_003
filetype_004
filetype_005
filetype_006
filetype_007
filetype_008
filetype_009

please tell me how do I proceed.

Thanks in advance,
Kumar

From your post this is what I get.

A new filename is being generated everytime and you want to retain the old files (which are split) as well.

Solution. Introduce a time/date variable

csplit -f filetype_`date`_ -n 3 filename '/regexpn/' {5}

If it is not a generated file, then it means the corresponsing files between filename_[000-004] and filename_[005-009] are the same.

You might as well use

csplit -f filetype_ -n 3 filename '/regexpn/' {10}

vino

Dear vino,
thanks for ur reply.
i need is as follows,
first time when i execute csplit, it will generate following files
file_name_000
file_name_001
file_name_002
file_name_003
file_name_004
file_name_005

If I run the csplit command for second time(or when ever in future)
it sholud start splittling the source file by putting the file number 006 onwads
i.e.
file_name_006
file_name_007
file_name_008
file_name_009
file_name_010
file_name_011

in resulting file name i.e., "file_name_" should not change, only file numbers should start from next highest number of existing file number.

i.e., after runing the csplit command twice(each time it will produce 6 files), i shold have following files,

file_name_000
file_name_001
file_name_002
file_name_003
file_name_004
file_name_005
file_name_006
file_name_007
file_name_008
file_name_009
file_name_010
file_name_011

please reply.

Thanks and regards,
Kumar