dcsimg

Making Directories (Again)

A more robust way of creating a directory in a script is with mkdir -p. For example, mkdir -p dir || exit 1 makes the directory dir regardless of whether it exists or not, but exits with an error if the entry already exists but not as a directory. (Thanks to Stuart Mitchell.)

Comments are closed.