If you think of Ruby as a more readable / maintainable Perl -- it's much better suited to these text processing tasks.
Ruby even supports Perl regular expressions which are more powerful and convenient than Awk's.
Some version of Ruby is usually in the base system of every Linux system (perl5 is more ubiquitous but much more cryptic)