> On April 3, 2013, 2:25 a.m., Vinod Kone wrote:
> > src/deploy/mesos-start-masters.sh.in, line 19
> > <https://reviews.apache.org/r/10244/diff/1/?file=277289#file277289line19>
> >
> >     I'm a bit confused on what lines you want to ignore.
> >     
> >     For e.g: if a masters file looks as follows:
> >     
> >     # My ip1
> >     ip1
> >     ip2 # My ip2
> >     
> >     Looks like you are trying to only select ip1? Is this true? If yes, why 
> > not just do 'grep -v "#"' ?
> >
> 
> Andrew Ash wrote:
>     The regex drops all lines that start with a # or several spaces followed 
> by a #
>     
>     The idea is to have a series of ips that you can comment out by putting a 
> # in front, going from:
>     
>     10.1.1.1
>     10.1.1.2
>     
>     to
>     
>     10.1.1.1
>     #10.1.1.2
>     
>     Without having to delete the second IP from the file.
>     
>     Because the regex starts with a start-of-line anchor (^) it doesn't match 
> your "ip2 #my ip2" example.  The purpose of my patch is more to be able to 
> comment out individual lines than to add a description to the end of a line.
>     
>     Does that make sense?

I see. Makes sense now.

Can you add a comment above the lines, indicating what you are trying to do. 
Also mention that you are not capturing the example I gave.

Also, I think the regular expression is wrong to match space. The [:space:] 
should be enclosed in another set of brackets, i.e., grep -v '^[[:space:]]*#'`


- Vinod


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/10244/#review18626
-----------------------------------------------------------


On April 3, 2013, 2 a.m., Andrew Ash wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/10244/
> -----------------------------------------------------------
> 
> (Updated April 3, 2013, 2 a.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Description
> -------
> 
> Ignore commented lines in slaves/masters files
> 
> Commented-out lines are those that are prefixed with a hash '#'
> 
> 
> Diffs
> -----
> 
>   src/deploy/mesos-start-masters.sh.in 
> d9833c39b0c6e9b8e9e1b9757a7486d852688643 
>   src/deploy/mesos-start-slaves.sh.in 
> 4f33babc7d72119b7bf10d394f5982c65360fc8b 
>   src/deploy/mesos-stop-masters.sh.in 
> 6800c19bccc4b93b4294b929328495b26d0f4ca0 
>   src/deploy/mesos-stop-slaves.sh.in e622eb0e9a23c7c095ccfa4da790c0f2cc8f7fc5 
> 
> Diff: https://reviews.apache.org/r/10244/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrew Ash
> 
>

Reply via email to