The webcomic xkcd is so good I have to resist the urge to blog just about every strip, but the latest one is just too good not to share.

Top excuse for slacking programmers


This of course applies not only to programmers, but sys-admins and DBAs as well. I mean really, some of those Oracle installs take a long time!

slacker, technology, compile, programming, code, excuse

So here’s a nice little Firefox easter egg for vi users:

In Firefox (at least version 2.0.0.6 on the PC, I haven’t confirmed this on others) you can search for text by simply typing a slash (/). As long as you’re not in a text entry box the / character will open up the find dialog box just like control-f would.

For those of you who don’t understand the significance of this, in the popular UNIX command line text editor vi you search for text by typing /string to find. This is typical of how vi works: powerful, simple commands which are rarely obvious.

vi, unix, linux, firefox, web, internet

Don Burleson points out that Oracle has sent out some Cardboard laptops!

Oracle cardboard laptop


The outside of the laptop which showed up in Andy Armstrong’s mail July 5th read “We’ve taken the idea that the outside world is a dangerous place for unprotected content.” and the inside reads “And shredded it.”

Thanks to Zach for posting the full text of the interior which reads:

“To derive maximum benefit from your business critical content, you need to share it across a wide user base. But the more people who have access to it, the greater the threat of sensitive information leaking to your competitors. That’s just for starters; content proliferation also raises the risk of regulatory non-compliance and escalating management costs. You know you can’t live without your information, but you’d be forgiven for wondering how to live with it.

Oracle’s recently acquired Information Rights Management solution can help. A key component of our Document and Records Management portfolio, it enables you to share your information when and with whom you want - without fear of the outside world.

But it doesn’t stop there. Should the worst happen - and your laptop falls into unsafe hands - we can even scamble your content before anyone works out how to access it.

We’ll be in touch shortly with more details of how to shred your content management worries.”

So what’s the story? What bandwagon is Oracle getting on here? Only time will tell. Burleson thinks it may be another step in their “unbreakable” theme. I think it may be something with Application Express as a content management system. Something to do with enterprise blogs or wiki or some other web 2.0 kind of content management.

wiki, blog, web, web20, web 2.0, oracle, dba, rdbms, dbms, marketing, laptop

UNIX and Linux shells provide an abundance of useful built-in information that can be referenced in globally available variables. In order to see the information provided in a shell, the set command can be run as demonstrated below.

Here’s a partial output of the set command:

$ set
BASH=/bin/bash
BASH_VERSINFO=([0]=”2″ [1]=”05b” [2]=”0″ [3]=”1″ [4]=”release” [5]=”i386-redhat-linux-gnu”)
BASH_VERSION=’2.05b.0(1)-release’
GROUPS=()
G_BROKEN_FILENAMES=1
HISTFILE=/home/tclark/.bash_history
HISTFILESIZE=1000
HISTSIZE=1000
HOME=/home/tclark
HOSTNAME=appsvr.mytec.com
OSTYPE=linux-gnu
PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/tclark/bin

PS1=’[\u@\h \W]\$ ‘
PS2=’> ‘
PS4=’+ ‘
PWD=/home/tclark
SHELL=/bin/bash
SHLVL=1
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_CLIENT=’206.107.231.178 1379 22′
SSH_CONNECTION=’206.107.231.178 1379 192.168.15.105 22′
SSH_TTY=/dev/pts/0
SUPPORTED=en_US.UTF-8:en_US:en
TERM=vt100
UID=503
USER=tclark
_=clear

The contents of a shell variable can be displayed by using the echo command and prefacing the variable name with a dollar sign as demonstrated below. Shell variables are referenced using all capital letters.

$ echo $TERM
vt100
$ echo $USER
tclark
$ echo $HOSTNAME … $LOGNAME
appsvr.mytec.com … tclark

There are also some special built-in variables that can be useful when creating shell scripts. Some of them are listed in the table below.

Built-in Variable Description
$# The total number of arguments passed to a shell script on the command line.
$* All arguments passed to the shell script.
$0 The command (script) invoked on the command line.
$1 - $9 The first through ninth arguments passed to the shell script from the command line.

These variables are provided by the shell and the names should not be used for other variables.

Easy Linux CommandsFor more tips like this check out my book Easy Linux Commands, only $19.95 from Rampant TechPress.

Buy it now!


linux, unix, system administration, sysadmin

Aliases can be used to perform complex commands but are set in the shell like environmental variables.

If you find yourself frequently using a fairly complicated command like the one below and want to be able to run it without typing the whole thing you can use the alias command to set up a shortcut.

$ alias alert=’tail -200 /u01/installed/software/mypgm/alert.log|more’

Now you can execute this whole command simply by typing alert. Many of the features of shell scripting are available in aliases including the pipe (|) used to send the output of one command to the input of another.

If you would like to have an alias automatically set up every time you enter a shell you can add the alias definition to your .profile file (or whatever file your default shell executes at login.)

A small set of well written aliases can save you a lot of keystrokes, just be careful not to make aliases with the same name as commands you use unless you want the alias to replace that command when you type it.

Easy Linux CommandsFor more tips like this check out my book Easy Linux Commands, only $19.95 from Rampant TechPress.

Buy it now!


linux, unix, system administration, sysadmin

« Previous PageNext Page »