DutchDaemon
March 13th, 2009, 14:55
Interesting, my bash scripts broke when I went to bash 4 ..
date=$(/bin/date)
bash: command substitution: line 17: syntax error near unexpected token `)'
bash: command substitution: line 17: `/bin/date)'
According to the manual, there's (still) nothing wrong with it:
Command Substitution
Command substitution allows the output of a command to replace the com-
mand name. There are two forms:
$(command)
or
`command`
I've seen this on several machines now (all 7.1-STABLE). Wonder if this is a port(ing) issue, or might bash be broken on other OS platforms? As my bash scripts are usually valid sh syntax, changing the bangpath to /bin/sh is no big deal, of course, but still ..
date=$(/bin/date)
bash: command substitution: line 17: syntax error near unexpected token `)'
bash: command substitution: line 17: `/bin/date)'
According to the manual, there's (still) nothing wrong with it:
Command Substitution
Command substitution allows the output of a command to replace the com-
mand name. There are two forms:
$(command)
or
`command`
I've seen this on several machines now (all 7.1-STABLE). Wonder if this is a port(ing) issue, or might bash be broken on other OS platforms? As my bash scripts are usually valid sh syntax, changing the bangpath to /bin/sh is no big deal, of course, but still ..