On 06/21/11 19:36, Marc Espie wrote: > On Tue, Jun 21, 2011 at 02:37:09PM +0300, Antti Harri wrote:
>> I use this in my .profile files, maybe it'll be useful to others too: >> >> local _test=$(grep "^installpath =" /etc/pkg.conf | cut -f 2 -d '=' | sed -e >> 's/ //') >> test -n _test && export PKG_PATH=$_test > Well, if you're going to use sed anyways: > > sed -ne '/^installpath = */s///p' /etc/pkg.conf Must... resist... sed -ne 's/^installpath = *//p' /etc/pkg.conf sorry. couldn't. ;-)
