I just volunteered at work for a project that involves creating a program to edit log files on a server.  By edit I mean extract useful information to another location and remove lines of text that is searched for to have certain text identifiers.My problem is that I am a linux beginner and I don't know the most efficient way to do this.Is it best to use a scripting language like python? or should I create shell files?I plan to have cron run the job every night.
What platform to use for programmatically editing text files?
text processing;scripting
Personally, I'd use Perl. That's because I'm familiar with Perl, and so is the rest of the company I work for. Our software is largely in Perl.But, that's not really an answer for you. You need to consider:How trivial is this problem? If its real trivial (grab the lines containing FOO), you can just use grep.Is it likely to remain trivial? If its likely to fairly quickly grow non-trivial, then you may just want to skip the trivial solution stage, because you'll just have to re-do it next week.Let's say its not trivial, then:What languages are you familiar with? Production code isn't really a great target for learning a new language.What languages are your coworkers familiar with? They're going to have to maintain your program in the future.Of your choices, which would be easiest to write the program in? To maintain it?Keep in mind which languages have libraries that'd help you out. Make sure to check.If it turns out that you and all your coworkers know Java, but not Perl, Python, or Ruby then Java might be the right answereven though Java is, taken alone, less suited to the task. Same if they all know PHP, or even C++.PS: Editing logs is somewhat weird. You might get more help here if you describe the problem you're trying to solve.