2 # split into multi part
3 # usage: mpart.rb [-nnn] file..
7 if (ARGV[0] =~ /^-(\d+)$/ )
19 for i in ifp = open(basename)
24 parts = fline / lines + 1
26 for i in ifp = open(basename)
28 ofp = open(sprintf("%s.%s%02d", basename, extname, part), "w")
29 printf(ofp, "%s part%02d/%02d\n", basename, part, parts)
30 ofp.write("BEGIN--cut here--cut here\n")
34 if line >= lines and !ifp.eof?
35 ofp.write("END--cut here--cut here\n")
41 ofp.write("END--cut here--cut here\n")