Skip to contentSkip to conversation

Linux 2.6.12-rc3

DISCUSSION Bodo Eggert <[email protected]> 1 participant 1 message Apr 24, 2005 11 messages not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

#11 lore raw
Quoted 2 lines · Greg KH

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

Just some basic comments:

Quoted 1 line

#!/bin/bash

set -e

Quoted 4 lines

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
Signature · 2 lines
Top 100 things you don't want the sysadmin to say:
70. Hmm, maybe if I do this...