[ale] Perl or Python for editing files...
Jim Lynch
ale_nospam at fayettedigital.com
Mon Oct 17 14:17:11 EDT 2011
On 10/17/2011 02:01 PM, Chuck Payne wrote:
> Guys,
>
> I have four files I like to be able to edit from a script. I have
> heard that it's better to use Perl or Python to this than bash.
>
> I am new to be perl and python from a scripting. What would be easy? I
> know it question that would open up a larger debate, but I really need
> help on this.
>
> If you recommend one of the two can you show me a site that explain
> how to open and write the files.
>
>
> Thanks,
>
It really depends on the complexity of the edit task. A combination of
bash, sed and awk can do simple edits, driving ex with bash can do a bit
more complex operations, but perl or python would be best for really big
editing jobs. So to answer your question give us a real world example
of what you want to do. What's the input and the desired output?
Jim.
More information about the Ale
mailing list