glederfein
June 14th, 2010, 05:14 PM
I want to write a bash script that makes a directory in a path with spaces in it.
For example:
#!/bin/bash
dir="/cygdrive/c/Documents and Settings/guy/My Documents"
mkdir $dir/new
For some reason this splits up the $dir variable (by spaces) and mkdir fails.
Please help.
For example:
#!/bin/bash
dir="/cygdrive/c/Documents and Settings/guy/My Documents"
mkdir $dir/new
For some reason this splits up the $dir variable (by spaces) and mkdir fails.
Please help.