Live Chat!

sudo is different from su

          0 votos

September 21st, 2006 mysurface

Some of the distro uses sudo to gaim access to run root privilage commands. But some of the distro do not include sudo by default such as FC5. To run some root privilage programs, you need to login as root by using su and gives root password.
Sometimes admin would not like to give away the [...]

Posted in Admin, source, sudo | Hits: 7095 | 2 Comments »

IMPORT VARIABLE(S) AND FUNCTION(S) FROM FILE

          0 votos

September 14th, 2006 durian

If you have a lot of variables set in a configuration file and you need to access all those variables quickly, you can try to use
source filename
For example, you have a configuration file named /etc/vars.conf with the following content:
VAR1=hkong

VAR2=is

VAR3=leaving

function test1 {

echo $VAR3 $VAR2 $VAR1

}
You can then invoke
source /etc/vars.conf
Then the variables and function will be accessible [...]

Posted in Common, source | Hits: 1606 | 2 Comments »