[Debian-eeepc-devel] Changes for eeepc-acpi-scripts

Nico Golde debian-eeepc+ml at ngolde.de
Thu Jun 12 16:17:43 UTC 2008


Hi Miek,
* Miek Gieben <miek at miek.nl> [2008-06-12 14:35]:
> [ Quoting Nico Golde in "Re: [Debian-eeepc-devel] Changes fo"... ]
> > The same applies for getent ;) I don't see the need for this 
> > "optimization" here. Besides that both, the shell and getent 
> > use the same syscalls to get the result ;)
> 
> So you consider this 
> 
>       user=$(who | sed -n '/ (:0[\.0]*)$\| :0 /{s/ .*//p;q}')
>       home=$(getent passwd $user | cut -d: -f6)
>       XAUTHORITY=$home/.Xauthority
> 
> to be of the same quality as this
> 
>       user=$(who | sed -n '/ (:0[\.0]*)$\| :0 /{s/ .*//p;q}')
>       XAUTHORITY=~$user/.Xauthority
> 
> I'm sorry, but I have to disagree.

Yes I do, it does the same and is way more readable, the 
chance of missing the ~ while reading the code is not low. 
This discussion is useless as long as you don't come up with 
proper arguments apart your definition of good taste.
We are talking about one line of code here.

Cheers
Nico
-- 
Nico Golde - http://www.ngolde.de - nion at jabber.ccc.de - GPG: 0x73647CFF
For security reasons, all text in this mail is double-rot13 encrypted.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/debian-eeepc-devel/attachments/20080612/6b2aa80e/attachment.pgp 


More information about the Debian-eeepc-devel mailing list