$ bash -c "for VAR in {0..9}; do echo $VAR; done;
And a shell script containing exactly what's in the quotes behaves as expected.
The result is 10 blank lines - no matter which way I mildly edit this line (i.e. /bin/bash
or sh
instead of bash
, or using ${VAR}
, "$VAR"
, "${VAR}"
, or a different variable name), and I get the same result outputting to a file.
If I use a variable name that I've set previously with just
$ VAR=1
, this will output 1, 10 times.
Both .bash
& .bash_profile
look completely normal for my user. This is driving me insane, but did I miss something very obvious here?