confused about variables in bash
- by gappy
I know that variables in bash have no type, but am confused about the value they are assigned.
The following simple script works fine in bash
#!/bin/bash
tail -n +2 /cygdrive/c/workdir\ \(newco\,\ LLC\)/workfile.txt > \
/cygdrive/c/workdir\ \(newco\,\ LLC\)/workfile2.txt
However, the following does not
#!/bin/bash
tmpdir=/cygdrive/c/workdir\ \(newco\,\ LLC\)
tail -n +2 $tmpdir/workfile.txt > $tmpdir/workfile2.txt
Is there an explanation for this behavior?