I'd like to be able to comment out a single flag in a one-line command. Bash only seems to have from # till end-of-line comments. I'm looking at tricks like:
ls -l $([ ] && -F is turned off) -a /etc
It's ugly, but better than nothing. Is there a better way?
The following seems to work, but I'm not sure whether it is portable:
ls -l `# -F is turned off` -a /etc
#commenttrick is also mentioned here: stackoverflow.com/questions/9522631/… - Juha Palomäki${IFS#comment}introduced by @pjh in the comments. No sub-shell is invoked. - alexis