2011-10-17

Escaping in bash. Who knows ?

I have such script for bash:


#!/bin/bash
set -x
a () 
   echo $1 
}

b () 
   a "--some-flag='param1 param2,param3'" 
}
b

In the a () function "echo" is called like below:
echo '--some-flag='\''param1' 'param2,param3'\'''

How can I pass parameter to a () function without escaping ?

To make it possible to call echo as follow:
echo --some-flag='param1 param2,param3'

I mean to pass parameters as is?

2011-10-15

Installation of Grub2 in Gentoo

I'm bothered to use LILO and want something new.
I've decided to install GRUB2.

1. Unmask package:
echo ">=sys-boot/grub-1.99-r2" >> /etc/portage/package.unmask

2. Build
emerge grub

3. Setup
 grub2-mkconfig -o /boot/grub2/grub.cfg

4. Checking if configuration looks good.
grub2-install --grub-setup=/bin/true /dev/sda

5. Installing
grub2-install /dev/sda

6. Rebooting
reboot.

2011-10-05

Apple has lost a visionary genius

Apple has lost a visionary and creative genius, and the world has lost an amazing human being. Those of us who have been fortunate enough to know and work with Steve have lost a dear friend and an inspiring mentor. Steve leaves behind a company that only he could have built, and his spirit will forever be the foundation of Apple.

2011-10-04

kernel.org is back

kernel.org is back.
Waiting for results of hacking investigation.

P.S. on lwn.net the link was given to https://www.kernel.org,
secure connection of https://www.kernel.org looks good,
but https://kernel.org says that certificate is only valid for *.kernel sites :-).