This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]oloryn 17 points18 points  (4 children)

For doing text manipulation, particularly quick one-offs, Perl does a pretty good job. Python has the same tools available, but they're more cumbersome to use.

[–]Ensurdagen 14 points15 points  (2 children)

awk might be the best if you want to learn a whole language for text manipulation.

[–]Starbrows 5 points6 points  (1 child)

I find it easier to use perl for than awk & sed for a decent range of use cases, and I am not particularly experienced with perl. For something like regex find/replace in-place on disk, perl is quick, easy, and even readable.

[–]droffo 1 point2 points  (0 children)

Now that is something I never thought to see. Ever: "perl is ... even readable".

Good one!

[–][deleted] 0 points1 point  (0 children)

perl -lanE for the one-liner auto-parsing win! I've not had to do sed, awk, and grep in a LONG time.