Monday, April 20, 2009

A whole new world

Oracle buys Sun Microsystem.

What will it look like when Oracle MySQL and Berkeley DB come together?

Which one is better Oracle Internet Directory(OID) or Sun Directory Server?

JAVA maybe is the only one that is needed by everyone

What will the fate of Solaris be, another Linux or FreeBSD?

Network is still computer, but Sun is no longer that Sun was.

Friday, April 3, 2009

Shell Programming Tips

$Variables
$n:$1the first parameter,$2 the second one ...

$#:number of parameters
$0:name of current running program

$?:return value of command or function just have been called
$*:save all the parameters as "parameter 1, parameter 2, ..."
$@:
save all the parameters as "parameter 1", "parameter 2", ...
$$:PID of this program

$!:PID of last program called by this program

read load value of variables from file
#cat VERSION
3.2.11

IFS=.
read MAJOR MINOR PATCH <> VERSION

Using &&

express1 && express2
the express right of "&&" will be executed when the left one return true.
Using ||
express1 || express2
the express right of "&&" will be executed when the left one fail to execute.

trap
trap " " 1 2 3 to ignore the SIGHUP SIGINT SIGQUIT signals
trap : 1 2 3 to receive the SIGHUP SIGINT SIGQUIT signals

Fast, Safe, Open, Free!
Open for business. Open for me! » Learn More