5

Useless Cat usage

view full story
linux-howto

http://www.unix.com – Code: cat ~/text.xt | while read line do         echo ${line} | perl -pe 's/(\d+)/localtime($1)/e' done how can i efficiently re-code the above? also, no matter how i run this, i'm not getting the current/correct date. the contents of the "text.xt" looks like this: Code: [1352265804] SERVICES ................. [1352265804] SERVICES ................. when i run the above code, i get: Code: Thu Jan  1 00:00:01 1970 SERVICES ................. Thu Jan  1 00:00:01 1970 SERVICES ................. which is obviously not accurate. unix o (HowTos)