[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Shell comment ignored

From: Keith Clifford
Subject: Shell comment ignored
Date: Thu, 16 Aug 2012 17:36:45 -0700


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 command.


If there is no space after the '#':




Then some_var is set to '#What'.



Keith Clifford.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]