Re: Linux 2.6.12-rc3

Bodo Eggert <harvested.in.lkml@posting.7eggert.dyndns.org>
2005-04-24T15:11:28Z

Greg KH <greg@kroah.com> wrote:

> Feel free to make it better, I have never claimed to be a bash
> programmer :)

Just some basic comments:

> #!/bin/bash

set -e

> DIR=$1
>
> mkdir $DIR
> cd $DIR
[...]

General rule: _*Allways*_ use quotes for variable expansion.

Reason:

$ md foo\ bar
$ DIR=Foo\ bar
$ cd $DIR
bash: cd: foo: No such file or directory

--
Top 100 things you don't want the sysadmin to say:
70. Hmm, maybe if I do this...