« north korea | Main | eboy »

shell arguments

useful shell scripting trick:

$ set -- `uname -a`

then variables $1 through $n are set to the fields of the back ticked command, in this case:

$ echo $1
SunOS
$ echo $2
booger
$ echo $3
5.7

etc. neat. saves having to parse out the fields, or use awk or something.

About

This page contains a single entry from the blog

The previous post in this blog was north korea.

The next post in this blog is eboy.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33