LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-28-2011, 11:49 AM   #16
wje_lq
Member
 
Registered: Sep 2007
Location: Mariposa
Distribution: FreeBSD,Debian wheezy
Posts: 811

Rep: Reputation: 179Reputation: 179

Quote:
Originally Posted by quanta View Post
@wje_lq: I mean the caret sign in ^No. in my code, not caret sign in form feed
Very good. :) That fixes it.

It does leave one question: what to do with the form feeds. fad216 didn't specify what he wanted done with those, but we can speculate that he might be reading the output data with another program, which might be confused by form feeds, so he might want to remove them.
  1. kurumi leaves each form feed at the end of the file that precedes it.
  2. makyo leaves each form feed at the beginning of the file that follows it.
  3. So does Nominal Animal.
  4. So does quanta (as revised).
  5. wje_lq removes the form feed entirely.
At this point, fad216 can pick and choose.
 
Old 03-01-2011, 12:05 AM   #17
fad216
LQ Newbie
 
Registered: Feb 2011
Posts: 11

Original Poster
Rep: Reputation: Disabled
thanx everyone that reply for my problem...I have get solution from all of you...the solution from Nominal Animal, quanta and kurumi is produced same output that I want which is create new file each split data. The other solution using bash [makyo], clisp [wqe_lq], I don't know how to implement or maybe I don't have install clisp and bash. But I think everything is same output...thanks everyone
 
Old 03-02-2011, 06:15 AM   #18
kurumi
Member
 
Registered: Apr 2010
Posts: 228

Rep: Reputation: 53
Quote:
Originally Posted by wje_lq View Post
Yes. But beyond stating the version number, it's important, if you're reaching out to potential ruby users, to say that the version you use makes a difference.
then I would be very busy isn't it? I have to test my code for every version of Ruby to see if they fit all. So returning you the favor, did you test your clisp script for every version as well? And clisp? Its cool that not often you see people using clisp to do such tasks, but I myself find it esoteric, ugly and unreadable (no offense, this is just a personal 2 cents). Besides, i don't see many people using it for everyday sysadmin tasks...except for academic maybe?

Quote:
Even so, when I used ruby 1.9, the output files were named wrong. In the following run, the input file is named data.txt, and I do a precautionary removal of the output f* files at the beginning.
hey but OP says he has got the correct output...so ...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to split a file into multiple files using AWK? keenboy Linux - General 1 08-05-2010 01:18 PM
split very large 200mb text file by every N lines (sed/awk fails) doug23 Programming 8 08-10-2009 06:08 PM
Split large file in several files using scripting (awk etc.) chipix Programming 14 10-29-2007 11:16 AM
awk command to split file Hebron Linux - Newbie 3 08-27-2007 07:35 PM
How to split file , .. awk or split ERBRMN Linux - General 9 08-15-2006 12:02 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration