normalsplitting file into multiple files with naming

More
1 month 1 week ago #2532 by Lewis-H
You can use the linux bash core utility split
split -b 1M -d  file.txt file 
Note that M or MB both are OK but size is different. MB is 1000 * 1000, M is 1024^2
If you want to separate by lines you can use -l parameter.
UPDATE
a=(`wc -l yourfile`) ; lines=`echo $(($a/12)) | bc -l` ; split -l $lines -d  file.txt file
Another solution as suggested by Kirill, you can do something like the following
split -n l/12 file.txt
Note that is l not one, split -n has a few options, like N, k/N, l/k/N, r/N, r/k/N.

Please Log in or Create an account to join the conversation.

  • rob.vanbergeijk@belvilla.com
  • rob.vanbergeijk@belvilla.com's Avatar Topic Author
  • Offline
More
3 months 4 weeks ago #2267 by rob.vanbergeijk@belvilla.com
splitting file into multiple files with naming was created by rob.vanbergeijk@belvilla.com
Can I use Kutools to split 1 word file into 300 subfiles, where I assign the name of the file by using the titel of a paragraph or another field?

Please Log in or Create an account to join the conversation.

Moderators: jaychivoExcelfansqiuhongkun