Sri wrote: > Hi, > I have to implement a parser tool which shall take input as a text file in > the ASCII format. get the values of some parameters written in this file, do > some processing as then output it to a text file again an ASCII format. > I am very much comfortable in C and I'm doing it in C using string > manipulations in C.
Depends on the layout of the file. Depending on the file type, you could pull in a library that does the parsing for you (e.g. XML, CSV, etc.). > just wanted to know that if there are some more efficient ways to any other > scripting languages like perl/python. IMO, PHP is great for quick-n-dirty data processing projects you don't plan on using more than a few times. PHP's associative arrays are incredibly powerful, easy-to-use, and, more importantly, are fast. I abuse them all the time for little data processing projects. Python, Ruby, Perl, and even C++ can't compare. Where PHP falls flat is raw data processing (i.e. processing a string character-by-character is slower in PHP than any other language) but that is pretty rare to have to deal with. Not saying you should use PHP. I'm just saying to use the right tool for the job (whatever the job is). > there is one more requirement, the input text file for this parser shall be > generated by another command line utility say a network sniffer etc. How to > call the command line utility from this parser program project(I am using > visual C++ IDE) Look at system() -- Thomas Hruska CubicleSoft President Ph: 517-803-4197 *NEW* MyTaskFocus 1.1 Get on task. Stay on task. http://www.CubicleSoft.com/MyTaskFocus/
