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
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,