Showing posts with label *nix. Show all posts
Showing posts with label *nix. Show all posts

Nvidia Video Card on Ubuntu

0
I have been having problem in setting up Ubuntu on my Dell Workstation. Ubuntu documentation provide minimal help so as the forums. And I finally got this

http://albertomilone.com/nvidia_scripts1.html

The script auto detects your video card and install proper driver.

And of course before you run this, I recommend you to uninstall all your drivers and refresh your X.11 setting to default.

Logging in shell script

0
We all enjoy the logging facilities in the modern programming language (e.g. log4j in java, c# logging in c#)

but what about shell script? The answer is an one liner


LOG(){echo "$(date +%c) $*"}

for console and

LOG(){echo "$(date +%c) $*" >> log.txt}

for txt out put.

Of course this is not the as sophisticated as the logging framework like log4j, but it simple and easy to use.

To use the function simply calls

LOG "Message"