[ale] Split

Ed Cashin ecashin at noserose.net
Tue Mar 13 14:06:15 EDT 2012


Well, since we're already off topic a bit, even though split is on
Linux systems, too, I'll use my BSD-based Mac to respond that because
there's no obvious problem with your example, perhaps you have a line
endings problem?  If the input has a different kind of line endings
than "\n", you might see the effect you describe.

ecashin at Ed-Cashins-MacBook-Pro hba$ man split > ~/tmp/mansplit
ecashin at Ed-Cashins-MacBook-Pro hba$ cd ~/tmp
ecashin at Ed-Cashins-MacBook-Pro tmp$ split -l 12 mansplit splitmansplit
ecashin at Ed-Cashins-MacBook-Pro tmp$ wc -l !$*
wc -l splitmansplit*
      12 splitmansplitaa
      12 splitmansplitab
      12 splitmansplitac
      12 splitmansplitad
      12 splitmansplitae
       5 splitmansplitaf
      65 total
ecashin at Ed-Cashins-MacBook-Pro tmp$

On Tue, Mar 13, 2012 at 1:10 PM, gcs8 <gcsviii at gmail.com> wrote:
> In a BSD system, I'm trying to split a text file every 12 lines, but every
> time I run split -l 12 text splittext, it just spits out the whole file
> again with a different name. Split, Y U NO WORK?
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>



-- 
  Ed Cashin <ecashin at noserose.net>
  http://noserose.net/e/
  http://www.coraid.com/



More information about the Ale mailing list