Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 04, 2016, 06:14:07 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Divide a txt file according rules  (Read 1890 times)

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Divide a txt file according rules
« on: December 28, 2012, 11:45:01 AM »
I would like a software to divide in several parts a txt file according rules.
By example :
A txt file with 30 lines of text divide in three files of 10 lines each one.

Best Regards
 :-*

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: -5
  • Posts: 3,395
    • View Profile
    • Donate to Member
Re: Divide a txt file according rules
« Reply #1 on: December 28, 2012, 12:00:37 PM »
Is this the only rule you will need?

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,778
    • View Profile
    • Donate to Member
Re: Divide a txt file according rules
« Reply #2 on: December 28, 2012, 01:15:43 PM »
For that kind of stuff, Stahlworks' Swiss File Knife has been a most excellent choice. :Thmbsup:

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Divide a txt file according rules
« Reply #3 on: December 28, 2012, 01:32:11 PM »
Running to try
Best Regards
 ;D

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Divide a txt file according rules
« Reply #4 on: December 28, 2012, 02:09:03 PM »
 :(
How can i do that with SFK
It's a little difficult for me.
 :-[

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 2,778
    • View Profile
    • Donate to Member
Re: Divide a txt file according rules
« Reply #5 on: December 28, 2012, 02:12:56 PM »
Try like this: http://stahlworks.co...index.php?tool=split There's an example called "splitting text files by no. of lines"

kunkel321

  • Supporting Member
  • Joined in 2009
  • **
  • Posts: 464
    • View Profile
    • Donate to Member
Re: Divide a txt file according rules
« Reply #6 on: December 28, 2012, 02:20:56 PM »
For that kind of stuff, Stahlworks' Swiss File Knife has been a most excellent choice. :Thmbsup:
This is my new favorite thing!

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Divide a txt file according rules
« Reply #7 on: December 28, 2012, 02:25:12 PM »
Try like this: http://stahlworks.co...index.php?tool=split There's an example called "splitting text files by no. of lines"
:-*
I'll try and comment
 ;D

x16wda

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 675
  • what am I doing in this handbasket?
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Divide a txt file according rules
« Reply #8 on: December 29, 2012, 09:17:53 AM »
Take a look at the Windows ports of Gnu Coreutils.  The Split command may do what you want:

C:\$DATA\$installers\copy-into-winnt>split --help
Usage: split [OPTION] [INPUT [PREFIX]]
Output fixed-size pieces of INPUT to PREFIXaa, PREFIXab, ...; default
PREFIX is `x'.  With no INPUT, or when INPUT is -, read standard input.

Mandatory arguments to long options are mandatory for short options too.
  -a, --suffix-length=N   use suffixes of length N (default 2)
  -b, --bytes=SIZE        put SIZE bytes per output file
  -C, --line-bytes=SIZE   put at most SIZE bytes of lines per output file
  -l, --lines=NUMBER      put NUMBER lines per output file
      --verbose           print a diagnostic to standard error just
                            before each output file is opened
      --help     display this help and exit
      --version  output version information and exit

SIZE may have a multiplier suffix: b for 512, k for 1K, m for 1 Meg.

Report bugs to <bug-textutils@gnu.org>.
vi vi vi - editor of the beast

Contro

  • Participant
  • Joined in 2007
  • *
  • Posts: 2,619
    • View Profile
    • Donate to Member
Re: Divide a txt file according rules
« Reply #9 on: December 29, 2012, 11:17:27 PM »
Try like this: http://stahlworks.co...index.php?tool=split There's an example called "splitting text files by no. of lines"

Thanks a lot Ath
Happy New Year !!!!!!!!!
 :P