LinuxQuestions.org
Register a domain and help support LQ
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 06-27-2006, 07:57 AM   #1
richikiki
Member
 
Registered: Mar 2005
Location: Montréal, Québec, Canada
Distribution: Slackware 12.1 x32, 13.1 x64
Posts: 90

Rep: Reputation: 15
Question What is the best way to parsing, handle files ksh, perl, c++


Hi guys,

I'm working parsing files that came from differents systems and I would like to know what is the best to parse files: ksh, perl, c++.

What advantages has each one?

Greetings.
 
Old 06-27-2006, 08:44 AM   #2
crabboy
Moderator
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
Ksh: The ksh option would be easy to get something together and parsing quickly. ksh would be a good option for simple parsing. ksh wouild also likely be slower than perl and c because if it's need spawn processes, (awk, sed, etc...) to parse the files.

perl: Good option of you know perl. Perl has great parsing abilities would be pretty quick. If you know perl, I'd suggest you use it, if you don't there may be quite a learning curve to get started.

C, C++: Not the best for just parsing files. Would probably require the most code out of the three, but once coded and tested, it would probably be the fastest.

Java: You didn't mention this one, but it would be my choice since I've never taken the time to learn Perl that well. There are all sorts of libraries to make parsing easy, like apache's commons string stuff.
 
Old 06-27-2006, 10:18 AM   #3
taylor_venable
Member
 
Registered: Jun 2005
Location: Indiana, USA
Distribution: OpenBSD, Ubuntu
Posts: 892

Rep: Reputation: 40
Of the three you listed, my vote goes to Perl. Manual pages abound for Perl and all it's components, so if you get stuck you've always got online documentation (in addition to LQ).

Another decent choice IMO would be Ruby; almost all the features of Perl in terms of text processing, but with syntax and semantics that might prove easier to understand and use. It's a tad slower than Perl, though.
 
Old 06-27-2006, 02:37 PM   #4
richikiki
Member
 
Registered: Mar 2005
Location: Montréal, Québec, Canada
Distribution: Slackware 12.1 x32, 13.1 x64
Posts: 90

Original Poster
Rep: Reputation: 15
Thanks for your feedback guys,

I have a mess on some systems and I'm trying to improve the processsing on the servers as most of the processing work is done by ksh and some with Perl.

On these servers, it is also installed JAVA but so far is not used.

I know JAVA and C++, a little bit of Perl. Therefore, I guess the best way to resolved my problem of FILE PARSING and processing is going to be JAVA.

Code:
What do you thing into use JAVA for parsing and processing files?
I have never used JAVA for parsing files.

I'm considering also Perl, but for now still my second option as I'm not expert on this lenguage.
I need to study more on that way
Regards
 
Old 06-27-2006, 07:36 PM   #5
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,261

Rep: Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028Reputation: 2028
Well, Perl was actually designed originally by Larry Wall to manage multiple machines across the USA, so I'd say it should be great for this job.
Less overhead than Java (install & running)
 
Old 07-06-2006, 07:16 AM   #6
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,287

Rep: Reputation: 173Reputation: 173
perl any time.
it is exactly what it is good at.

and no java.lang.out.of.memory.yet.again errors!
 
Old 07-06-2006, 08:09 AM   #7
richikiki
Member
 
Registered: Mar 2005
Location: Montréal, Québec, Canada
Distribution: Slackware 12.1 x32, 13.1 x64
Posts: 90

Original Poster
Rep: Reputation: 15
Red face

Thanks guys,

Well for the moment I will go forward with KSH for the parsing thing and in the near future I will go for PERL.
 
Old 07-06-2006, 08:18 AM   #8
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Debian, Mint, Puppy
Posts: 3,287

Rep: Reputation: 173Reputation: 173
well, if you need any help you know where
to come ;-)
 
  


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
Parsing XLS or CSV in Perl - what and what not me_the_apprentice Programming 13 02-28-2006 03:44 AM
perl files download instead of parsed on apache2 mod-perl2 not parsing perl files zeigerpuppy Debian 1 02-16-2006 05:31 AM
Parsing HTML using Perl smaida Programming 2 05-29-2004 01:20 PM
parsing a logfile in perl ludeKing Programming 2 04-30-2004 03:20 AM
Perl Parsing filename The Jesus Programming 4 10-03-2003 03:21 PM


All times are GMT -5. The time now is 09:08 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration