[Rear-users] SF.net SVN: rear:[556] trunk/usr/share/rear/lib/linux-functions.sh

Dag Wieers dag at wieers.com
Mon Jun 6 14:52:21 CEST 2011

On Mon, 6 Jun 2011, u at netbeisser.de wrote:

> On Mon, Jun 06, 2011 at 02:03:27AM +0200, Dag Wieers wrote:
>> On Sun, 5 Jun 2011, u at netbeisser.de wrote:
>> So if you like to change it into an awk, it needs to become something
>> like:
>>      awk '/^\t.+ => \// {print $3} /^\t\// {print $1}'
>> certainly more readable. Not sure if it is any faster, testing both on my
>> laptop is not conclusive, sometimes sed is faster, sometimes awk. Likely
>> it depends on disk I/O more than on sed or awk.
> I like the awk version for the better readability.


> FWIW, for me awk is "faster":

For me, the readability is a more convincing argument. Especially, since 
this is only run once. I'll add some documentation in the comment and 
switch to awk.

-- dag wieers, dag at wieers.com, http://dag.wieers.com/
-- dagit linux solutions, info at dagit.net, http://dagit.net/

[Any errors in spelling, tact or fact are transmission errors]

More information about the rear-users mailing list