help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GURU NEEDED : break a command into several lines and comment each li


From: bolega
Subject: Re: GURU NEEDED : break a command into several lines and comment each line
Date: Thu, 13 Jan 2011 22:28:51 -0800 (PST)
User-agent: G2/1.0

On Jan 13, 7:12 pm, Stefan Monnier <address@hidden> wrote:
> > #!/bin/bash -xv
> > command       \ # comment1
> >          -sw1 \ # comment2
> >          -sw2 \ # comment3
> >          arguments
> > One ought to be able to comment every single switch if desired for
> > whatever reason.
>
> Thanks for the riddle.  Here's a solution:
>
>   command        $(: # comment1
>   )        -sw1  $(: # comment2
>   )        -sw2  $(: # comment3
>   )        arguments
>
> -- Stefan

thanks to all four of you who replied and solved this problem to a
large extent, building on each other's ideas.

I would have done it by the first method of concatenating or pipes
into a sed which replaced end by the next and # can be placed after
pipes. the string then fed into a bash.

Stefan, whats the purpose of the colon ? it works without colon also.
Is it subshell or some environment import ? like the colon which can
substitute the #!/bin/bash on the top ?

Bolega


reply via email to

[Prev in Thread] Current Thread [Next in Thread]