gnewsense-dev
[Top][All Lists]
Advanced

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

RE: [Gnewsense-dev] Re: [gNewSense-users] possible error in gen-kernel b


From: Greenacre, Evan R CIV NSWCDD, K54
Subject: RE: [Gnewsense-dev] Re: [gNewSense-users] possible error in gen-kernel b
Date: Fri, 21 Aug 2009 10:37:20 -0400

Sorry, was just the perfectionist in me.  Most all this is really mute since we still don't understand what the ? is for.  (i.e. you can ignore this babbling geek)
 
To start, I aggree with holding off on the correction.
 
But to the regex itself,  the core of the _expression_ is the grouping [^ ?] (which will match anythingthing but blank or ?), but they wanted to make sure there was at least 1 character.  So originally that repeated it once and used the * on the second, which is the regex modifier for 0 or more times. The plus sign is the regex for 1 or more. So they end up being the same. However, long story short, not sure if it was needed since they put that inside of beginning and end of line markers (the very first carat ^, and the ending dollar $).
 
The complication comes when they have to be escaped.  The shell is grabbing some of those characters and doing its own thing with them first.  For instance, the parenthesis are being escaped to get them thru the shell and to the regex pattern.
The plus sign must need that to. My only question is, why don't we need to escape the asterick.  But there's more than one way to do it.
 
Evan Greenacre
NSWCDD, K54
540 653 1780
 
**NOTICE**  If you are reading this notice, you are probably a beaucrat with entirely too much time on your hands.  If you complain about it, you will only prove my point.
 


From: Sam Geeraerts
Sent: Thu 8/20/2009 4:28 PM
To: Greenacre, Evan R CIV NSWCDD, K54
Cc: address@hidden
Subject: Re: [Gnewsense-dev] Re: [gNewSense-users] possible error in gen-kernel b

Greenacre, Evan R CIV NSWCDD, K54 schreef:
> Sorry if this gets threaded wrong.
> 
> But the SED script, the plus sign doesn't work unless its escaped:
> 
> sed -i 's/^\([^ ?]\+\)$/\1 ?/' $i

Doesn't that make it a literal plus instead of a regex plus?

reply via email to

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