Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Alternatives to sed + awk



On 2 March 2011 21:33, Josh Glover <jmglov@example.com> wrote:

> Ruby is, of course, super awesome, though I still find myself reaching
> for perl -ne '...' from the command line for text transformation and
> filtering needs beyond basic sed and awk stuff.

Speaking of which:

root@example.com:~$ while true; do wc -l /tmp/lauch_code_ripper.log |
cut -d' ' -f 1 | perl -ne 'chomp; printf "%.02f%% ", "$_.0" /
596058.0'; sleep 15; done
0.01% 0.01% 0.01% 0.02% 0.02% 0.02% 0.02% 0.02% 0.02% 0.02% ...


-- 
Cheers,
Josh


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links