Re: Shell comment ignored

2012-08-16 Thread Eric Blake
On 08/16/2012 06:36 PM, Keith Clifford wrote: > > some_var=# What I thought was a comment. ^ Not the first byte of a word. # starts a comment only when it is the first byte of a word. You can write: some_var= #Now this is a comment, since there is space between = and # if you meant

Re: Shell comment ignored

2012-08-16 Thread Mike Frysinger
On Thursday 16 August 2012 20:36:45 Keith Clifford wrote: > some_var=# What I thought was a comment. > > The '#' is eaten by the variable assignment so that some_var gets a null > value and the rest of the line is not treated like a command. this is correct (if sometimes confusing to people) beha

Shell comment ignored

2012-08-16 Thread Keith Clifford
Hi, I first noticed this in a shell script under mingw but tested it in bash under Linux and it has the same behaviour. some_var=# What I thought was a comment. The '#' is eaten by the variable assignment so that some_var gets a null value and the rest of the line is not treated like a com