Create an Account
username: password:
 
  MemeStreams Logo

Split a text file in half (or any percentage) on Ubuntu Linux :: the How-To Geek

search

Lost
Picture of Lost
My Blog
My Profile
My Audience
My Sources
Send Me a Message

sponsored links

Lost's topics
Arts
Business
Games
Health and Wellness
Home and Garden
Miscellaneous
Current Events
Recreation
Local Information
Science
Society
Sports
Technology

support us

Get MemeStreams Stuff!


 
Split a text file in half (or any percentage) on Ubuntu Linux :: the How-To Geek
Topic: Technology 10:54 pm EDT, Mar 28, 2009

If you have an unwieldy text file that you are trying to process, splitting it in sections can sometimes help processing time, especially if we were going to import a file into a spreadsheet. Or you might want to just retrieve a particular set of lines from a file.

Enter split, wc, tail, cat, and grep. (don't forget sed and awk). Linux contains a rich set of utilities for working with text files on the command line. For our task today we will use split and wc.

Split a text file in half (or any percentage) on Ubuntu Linux :: the How-To Geek



 
 
Powered By Industrial Memetics
RSS2.0