Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

spliting the file

Posted on 2005-05-02
2
Medium Priority
?
190 Views
Last Modified: 2010-03-05
split -n filename always spitts the file into 3 files

how can i split  the file into 2 files

Rahul

0
Comment
Question by:shahrahulb
2 Comments
 
LVL 6

Accepted Solution

by:
Talmash earned 2000 total points
ID: 13910873
its depends on the file length,
AFAIK, each 100 lines make new file
since you get 3 , you have 201 to 300 lines

split -l 150 filename, will give you 2 files

to have it all time 2 files, it's lightly complicated (use 'wc -l filename' and devide it by 2)
i.e, file with 15000 lines, split -l 150 filename , will give 100 files
0
 
LVL 16

Expert Comment

by:manav_mathur
ID: 13915448
Why does this question appear in the Perl TA??
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question