What does the # mean in a for loop in bash? Unfortunately, I don't get information googling about it.
For example:
for n in 2 3 4 # 5 6 7 8 9 10
do
...
done
?
What does the # mean in a for loop in bash? Unfortunately, I don't get information googling about it.
For example:
for n in 2 3 4 # 5 6 7 8 9 10
do
...
done
?
That #
simple is a 1-line comment, like the //
in C++ and Java.
This is a comment example:
int i = 0; // Declare an integer to 0.
And then, in bash
# Test script
for n in 2 3 4 # 5 6 7 8 9 10
do
echo $n # But don't do this text to the right of the #
done