長いスイッチの多いコマンドを呼び出すときは、シェルスクリプトで記述することをお勧めします。そのようなスクリプトで行をコメントする簡単な方法はありますか?次の方法を試しましたが、どちらも機能しません。
# the \ is also commented out, resulting in "command" and "--good-switch".
command \
#--bad-switch \
--good-switch \
# seems to send an extra argument to the command
command \
\ #--bad-switch \
--good-switch
\次の文字をエスケープします。これは、改行を「隠します」が、スペースを有効にします)。