GURU NEEDED : break a command into several lines and comment each line
Berthold Höllmann
bhoel at despammed.com
Thu Jan 13 16:45:20 EST 2011
bolega <gnuist006 at gmail.com> writes:
> Basically, I have spent a few hours experimenting and searching on the
> comp.unix.shell
>
> how to break a command with several switches into more than one line
> AND to be able to put some comment on each line.
>
> #!/bin/bash -xv
>
> command \ # comment1
> -sw1 \ # comment2
> -sw2 \ # comment3
> arguments
How about
-----------
#!/bin/bash -xv
COMMAND=command # comment1
COMMAND=$COMMAND -sw1 \ # comment2
COMMAND=$COMMAND -sw2 \ # comment3
COMMAND=$COMMAND arguments
$COMMAND
---------
?
Regards
Berthold
> One ought to be able to comment every single switch if desired for
> whatever reason.
>
> Bolega
>
>
--
A: Weil es die Lesbarkeit des Textes verschlechtert.
F: Warum ist TOFU so schlimm?
A: TOFU
F: Was ist das größte Ärgernis im Usenet?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20110113/1ef45e0d/attachment-0001.sig>
More information about the Python-list
mailing list