On Friday, December 6, 2019 6:06:10 PM CET, songbird wrote:
result=`echo "summary: \"\"" | sed -e "s/^summary: .*$/summary:
\"${old_summary}\"/"`
of course this doesn't work. since you use '/' (slash) as delimiter in the
sed expression, the slash in $old_summary is interpreted as the delimite
On Vi, 06 dec 19, 14:50:51, Greg Wooledge wrote:
> On Fri, Dec 06, 2019 at 02:40:49PM -0500, songbird wrote:
> > Greg Wooledge wrote:
> > ...
> > > Ideally, you'd just stop trying to use sed with user-supplied variables
> > > injected into the code. Sed was never built to be safe for that kind of
On Vi, 06 dec 19, 14:40:49, songbird wrote:
>
> the point of doing something in bash is to do it quick and
> see if the concept is useful enough. if enough people decide
> to use it then it can be more formalized.
We often build prototypes / proof-of-concept / experiments that live
much longe
On Sat, 7 Dec 2019, at 14:20, songbird wrote:
> The Wanderer wrote:
>
> ... about various characters and then @ in particular ...
>
> > As far as I can see, at least on my keyboard, that pretty much just
> > leaves @. It does still sometimes occur in paths and filenames, so it's
> > not really i
On Sat 07 Dec 2019 at 09:27:59 (-0500), rhkra...@gmail.com wrote:
> On Saturday, December 07, 2019 07:20:35 AM The Wanderer wrote:
> > Yep - using '/' is only a standard convention, it's not required. When
> > writing an s-expression which I know will be passed a path, I generally
> > use '@' mysel
Andrei POPESCU wrote:
...
pre processing for that one character using a different delimiter
and then processing the results of that with the original delimiter
seems to cover everything i'm worried about. :)
> One trick to avoid this problems is to use a different delimiter, e.g. '|'.
>
> Acco
The Wanderer wrote:
... about various characters and then @ in particular ...
> As far as I can see, at least on my keyboard, that pretty much just
> leaves @. It does still sometimes occur in paths and filenames, so it's
> not really ideal, but it's probably less common there than any of the
>
On Saturday, December 07, 2019 07:20:35 AM The Wanderer wrote:
> Yep - using '/' is only a standard convention, it's not required. When
> writing an s-expression which I know will be passed a path, I generally
> use '@' myself; that A: is conveniently typable on the keyboard, B: is a
> comparativel
On 2019-12-07 at 04:43, Andrei POPESCU wrote:
> On Vi, 06 dec 19, 16:15:51, songbird wrote:
>
>> The Wanderer wrote:
>>>
>>> For example, 's/hello/newstring/' would be a valid sed
>>> 's'-expression, but 's/a/b/newstring/' would not; the former
>>> contains three instances of the delimiting toke
On Vi, 06 dec 19, 16:15:51, songbird wrote:
> The Wanderer wrote:
> >
> > For example, 's/hello/newstring/' would be a valid sed 's'-expression,
> > but 's/a/b/newstring/' would not; the former contains three instances of
> > the delimiting token, which is valid, but the former contains four,
> > w
Erik Christiansen wrote:
...
> If the sed implementation of variable regexes proves problematic, then
> there's awk with its Dynamic Regexps. (Section 2.8 of the pdf manual
> floating about out there.)
>
> With its C-like syntax, it's less write-only than perl, perhaps because
> it is of the same v
On 06.12.19 14:40, songbird wrote:
> Greg Wooledge wrote:
> ...
> > Ideally, you'd just stop trying to use sed with user-supplied variables
> > injected into the code. Sed was never built to be safe for that kind of
> > work.
>
> sed was designed to operate on streams. a sequence of
> charact
Greg Wooledge wrote:
...
> If you insist on doing #1, so be it. It's your damned computer, and your
> damned problem. I can only warn you and be ignored so many times
> before I give up and let your fuck yourself, as you so vehemently and
> stubbornly eager to do.
i appreciate the actual expla
The Wanderer wrote:
>songbird wrote:
...
>> sed was designed to operate on streams. a sequence of characters is
>> a stream. i don't see any reason why putting the variable into the
>> middle of that expression means anything different.
>
> Because sed doesn't see the variable; the variable is ha
On 2019-12-06 at 14:40, songbird wrote:
> Greg Wooledge wrote: ...
>> Ideally, you'd just stop trying to use sed with user-supplied
>> variables injected into the code. Sed was never built to be safe
>> for that kind of work.
>
> sed was designed to operate on streams. a sequence of characters
On Fri, Dec 06, 2019 at 02:40:49PM -0500, songbird wrote:
> Greg Wooledge wrote:
> ...
> > Ideally, you'd just stop trying to use sed with user-supplied variables
> > injected into the code. Sed was never built to be safe for that kind of
> > work.
>
> sed was designed to operate on streams. a
Greg Wooledge wrote:
...
> Ideally, you'd just stop trying to use sed with user-supplied variables
> injected into the code. Sed was never built to be safe for that kind of
> work.
sed was designed to operate on streams. a sequence of
characters is a stream. i don't see any reason why
putti
On Fri, Dec 06, 2019 at 12:06:10PM -0500, songbird wrote:
> #this doesn't work...
> old_summary=`echo "Previous glitches and inconsistencies were due to a
> missing / at the end of the baseurl... ,.#*$+%*$+(*={_})"`
> result=`echo "summary: \"\"" | sed -e "s/^summary: .*$/summary:
> \"${old_s
On Fri, 04 Jun 2004 17:30:28 +0200, Ralph Crongeyer
<[EMAIL PROTECTED]> wrote:
> Carlos Hanson wrote:
>
> >On Fri, 04 Jun 2004 10:31:07 -0400
> >Ralph Crongeyer <[EMAIL PROTECTED]> wrote:
> >
> >>I need to do a pattern match with sed of "(" and ")". I need to replace
> >>every ( with "(" and ev
On Fri, 04 Jun 2004 11:28:50 -0400
Ralph Crongeyer <[EMAIL PROTECTED]> wrote:
> Carlos Hanson wrote:
>
> >On Fri, 04 Jun 2004 10:31:07 -0400
> >Ralph Crongeyer <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> >>Hi all,
> >>I need to do a pattern match with sed of "(" and ")". I need to
> >replace >eve
Carlos Hanson wrote:
On Fri, 04 Jun 2004 10:31:07 -0400
Ralph Crongeyer <[EMAIL PROTECTED]> wrote:
Hi all,
I need to do a pattern match with sed of "(" and ")". I need to replace
every ( with "(" and every ) with ")" on every line.
Can someone help me with this?
Thanks
Ralph
On Fri, 04 Jun 2004 10:31:07 -0400
Ralph Crongeyer <[EMAIL PROTECTED]> wrote:
> Hi all,
> I need to do a pattern match with sed of "(" and ")". I need to replace
> every ( with "(" and every ) with ")" on every line.
>
> Can someone help me with this?
>
> Thanks
>
> Ralph
>
sed 's/[()]/"&"/
thanks Carlos, that works great. I think I am beginning to get grasp regular
expression syntax now.
Thanks very much for you help
John
On Sun, 31 Aug 2003 14:05:38 +0100
Carlos Sousa <[EMAIL PROTECTED]> wrote:
> On Sun, 31 Aug 2003 22:38:58 +1000 John Habermann wrote:
> > I tried":
> >
> >
On Sun, 31 Aug 2003 22:38:58 +1000 John Habermann wrote:
> I tried":
>
> cat temp | sed 's/^[[:alpha:]]*[[:space:]]*//' > log
>
> Where temp is:
>
> test.wilderness.org.au/about_us/whatistwsck 203.48.59.163 - -
> [26/Aug/2003 08:14:01] "GET
> http://test.wilderness.org.au/about_us/whatistws HT
Hi Carlos
Thanks for your help.
On Sun, 31 Aug 2003 02:10:14 +0100
Carlos Sousa <[EMAIL PROTECTED]> wrote:
> On Sun, 31 Aug 2003 10:20:46 +1000 John Habermann wrote:
> > I have tried things like the following:
> >
> > sed -e 's/^w.*\s//' > log
> >
> > thinking that it would delete from the be
On Sun, 2003-08-31 at 07:38, John Habermann wrote:
> Hi Carlos
>
> Thanks for your help.
>
>
> On Sun, 31 Aug 2003 02:10:14 +0100
> Carlos Sousa <[EMAIL PROTECTED]> wrote:
>
> > On Sun, 31 Aug 2003 10:20:46 +1000 John Habermann wrote:
> > > I have tried things like the following:
> > >
> > > s
In article <[EMAIL PROTECTED]> you wrote:
> I tried:
> cat temp | sed 's/^[[:alpha:]]*[[:space:]]*//' > log
> Where temp is:
> test.wilderness.org.au/about_us/whatistwsck
> 203.48.59.163 - - [26/Aug/2003 08:14:01] "GET
> http://test.wilderness.org.au/about_us/whatistws HTTP/1.0" 200 20872 "-"
hi ya john
change your /etc/httpd/conf/httpd
Server www.domain-A.com
TransferLog logs/access_log.A
...
Server www.domain-B.com
TransferLog logs/access_log.B
...
Server www.domain-C.com
TransferLog
On Sun, 31 Aug 2003 10:20:46 +1000 John Habermann wrote:
> I have tried things like the following:
>
> sed -e 's/^w.*\s//' > log
>
> thinking that it would delete from the beginning of the line to the
> first white space but it deletes all matched expressions.
(man sed, man grep)
It seems you m
On Wed, Mar 28, 2001 at 10:42:44PM -0600, [EMAIL PROTECTED] wrote:
> I need a sed invocation to extract quotes (") from around a string.
>
> Basicly `cat /etc/bind/named.conf | grep zone | cut -d " " | sed $something'
>
> to give me a list of zones I run bind for so I can:
> for zone in `$sedcsri
> "Daniel" == Daniel Reuter <[EMAIL PROTECTED]> writes:
Daniel> It should work from command line using bash's multiline
Daniel> input capability (with the '). It checks for % at the end
Daniel> of lines (hence the $), then reads the next line into the
Daniel> buffer and then re
Hello Brian,
Check this:
sed '/%$/{
N
s/%\n//
}' yourfile.bib
It should work from command line using bash's multiline input capability
(with the '). It checks for % at the end of lines (hence the $), then
reads the next line into the buffer and then removes the %\n sequence (I
don't quite unders
On Fri, 03 Nov 2000, Andrei Pelinescu - Onciul wrote:
> Jesse Goerz wrote:
> >
> > I'm trying to write a script and as part of it I need to change the "/" in a
> > variable to a "." and then put it right back into another variable. I've
> > tried
> > using sed but can't seem to grip these regula
Jesse Goerz wrote:
>
> I'm trying to write a script and as part of it I need to change the "/" in a
> variable to a "." and then put it right back into another variable. I've
> tried
> using sed but can't seem to grip these regular expressions 8-(. Here's what I
> got so far:
>
> echo $variabl
On Fri, Nov 03, 2000 at 08:10:48AM -0500, Jesse Goerz wrote:
> I'm trying to write a script and as part of it I need to change the "/" in a
> variable to a "." and then put it right back into another variable. I've
> tried
> using sed but can't seem to grip these regular expressions 8-(. Here's
On Fri, 3 Nov 2000, Brian May wrote:
> bibtex likes to word-wrap/mangle/destroy my long lines (eg. URLs) into
> this form:
>
> \bibitem[Mic00]{Microsoft2000}
> Microsoft.
> \newblock Windows 2000 kerberos authentication.
> \newblock White paper, Microsoft, January 2000.
> \newblock
>
> \url=ht
Andrew Hately ([EMAIL PROTECTED]) wrote:
> Back quotes can't be nested, while $( ) does the same job and can be nested
Actually, you can nest backquotes as long as you \-escape them. $( ) is
great, but if you're ever going to use a traditional Bourne shell, you
won't be able to use it -- so make
Ben Lutgens wrote:
>
> I had to use the back quotes``
Back quotes can't be nested, while $( ) does the same job and can be nested
--
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=45690
Hello,
> I am writing a shell script using sed I need to figure out how I can store the
> output of
>
> grep florida roam.db | sed -e "s/^.*\? //g"
>
> to a variable. roam.db has entries like, one per line.
>
> florida: 555-1212
you mean, in a shell variable? In bash and maybe sh this should
On Thu, Oct 21, 1999 at 03:36:01AM -0500, Eric Gillespie, Jr. wrote:
>
> Those are backticks (`), not apostrophes (').
Thanx, figured it out, and man did I feel like a dummy. About 15 minutes
after I sent off the e-mail. Nevermind that I tried everything for an hour or
two and read and read all d
On Thu, Oct 21, 1999 at 09:53:26AM +0200, Andrew Hately wrote:
> What do you want in the variable? Multiple lines?
> Did you try
> set foo=$( grep florida roam.db | sed -e "s/^.*\? //g" )
> Whats the greater context?
> Andrew
>
I finally got it with
export GREP_RESULT=`grep $LOCATION $HOME/roam.db
On Wed, Oct 20, 1999 at 11:37:26PM -0800,
Ben Lutgens <[EMAIL PROTECTED]> wrote:
> I am writing a shell script using sed I need to figure out how I can store the
> output of
>
> grep florida roam.db | sed -e "s/^.*\? //g"
>
> to a variable. roam.db has entries like, one per line.
value=`grep fl
42 matches
Mail list logo