I am failing to add comments for multi-line statements in bash script. Seems that bash is not interpreting.
Since comments can really be useful because there are potential 4-5 lines, can anyone advice me how to achieve this?
This is just basic example, which is - not working.
#!/bin/bash
iptables -A INPUT \
#Comment for rule bellow
-p tcp --dport 21 \
# Comment for rule bellow no2
-s 10.0.0.1 \
-j ACCEPT
I just give a plain example. Allowing comments can be more easier for complex examples (this is not complicated example, but you got a point) like this:
grep some_file \
#awk does that...
awk '{print $1}' \
#sed does that...
sed 's/match1/match2/g'
Of course there are no whitechars behind \.