python vs awk for simple sysamin tasks

  • Thread starter Matthew Thorley
  • Start date
D

Donald 'Paddy' McCarthy

Matthew said:
My friend sent me an email asking this:


I wasn't able to give him an afirmative answer because I've never used
python for things like this. I just spent the last while looking on
google and haven't found an answer yet. I was hoping some one out there
might have some thoughts ?

thanks much
-matthew
I think you will find that the examples could be re-written in python
(or perl), but assuming you have created the one liners above and so
know your way around 'the basics' then you would be most productive in
leaving a space for find and bash and sed and awk and grep ... for
mainly smaller scripts Python is not good for one liners but tends to be
easy to maintain.
I don't believe that you should abandon AWK once you learn Python,
especially if you do Sys-Admin work. Python has a broad range of uses
but it is not better than AWK in all cases, as I think others have shown
in the thread by giving a much longer Python version of an example.

Cheers, Paddy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top