| Inline bash in command comments |
|
|
|
|
I spent many time in search how add comment into long bash commands. For one my script, where it was very important for me even special flag was added which just ignored inner (look -c switch in HuRegRep). But I look something similar to (warning, example does not work): echo string0 \ string1 /* Second parameter required because... */ \ string2 In fact all is very simple - bash and sh just do not support such comments at all! At least I make such decision by many ununswered questions in forums and maillists. In speaking and brainstorming with friends born very interesting idea, which further became very elegant solution on my mind: unset comment
echo string0 \
string1 ${comment:"Second parameter required because..."} \
string2
Few additional words:
|
| Written by Павел Алексеев aka Pahan-Hubbitus |
| Saturday, 08 January 2011 19:21 |
| Last Updated on Sunday, 09 January 2011 01:17 |
Последнее из блога
Последнее из блога






