> From: John Burrell <john_burr...@hotmail.com>
> To: BLFS Development List <blfs-dev@lists.linuxfromscratch.org>
> Date: Mon, 7 Jul 2014 15:24:46 +0000
> Subject: Re: [blfs-dev] A couple of command inconsistencies
>
>
> > 
> > Yes, those points've already been made in your first post, understood,
> > and addressed in the reply: IOW, you might want to use e.g.:
> > 
> >     -e 's/\(.*\)&&[[:blank:]]*$/\1/'
> > 
> > or even
> > 
> >     -e 's/\(.*\)[[:blank:]]*&&[[:blank:]]*$/\1/'
> > 
> > or similar, depending on details of the processing environment - e.g. you
> > might need/want sed's '-r' flag also, &/or change the '[[:blank:]]' to
> > '[ \t]' (that first char is a single (horizontal-)space char) or to 
> > '[  ]' (a single horiz-space char and a single tab-char), &c.
> > 
>
> Well rather and try and deal with all possible chars after the &&, I've added 
> the
> blank to my script for iptables and ruby. If the editors decide to add more 
> spaces,
> or a tab or whatever after a &&, my script will fail and then I can try and 
> fix it.
>


 - but the '[[:blank:]]*' (without the quotes, obviously) deals with the
 'problem' once & for all: why would one spend the time to add just a
 blank to the sed, rather than add the regex ...  . But, it's your script,
 of course.


> No loss of life will ensue so 'suck it and see' is a good approach for this 
> problem.
>


(Maybe not loss of life, but perhaps loss/waste of time...  .)


rgds,
akh



> jb.
>
>                                         


--
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to