git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: problem installing latest cogito

From
Junio C Hamano <junkio@cox.net>
Date
Jan 21, 2006, 20:12 UTC
Message-ID
<7vmzhpl4r7.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<BAYC1-PASMTP061F43C7F760A9FB73B616AE1E0@CEZ.ICE>
sean <seanlkml@sympatico.ca> writes:
Show 14 quoted lines
> On Sat, 21 Jan 2006 20:48:26 +0100
> Petr Baudis <pasky@suse.cz> wrote:
>
>> >                 sed -e
>> > 's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/david\/lib\/cogito\/}/g; \
>> > 
>> > s/\${COGITO_SHARE}/\${COGITO_SHARE:-\/home\/david\/share\/cogito\/}/g'
>> > \
>> >                        $file > $file.new; \
>> >                 cat $file.new > $file; rm $file.new; \
>> >         done
>> > sed: -e expression #1, char 145: unterminated address regex
>
> The problem seems to go away if you remove the quoted end-of-line:

That is not "the quoted end-of-line". Backslashes do not have any special meaning inside a single quote pair for bourne shell quoting. The script is passing the backslash to sed.

IIRC, make seems to do different things for the backslash at the end of line depending on vintage, so if this scriptlet appears in a Makefile you may have another version dependency. I usually cop out of this problem by having a separate shell script and run it from the Makefile, instead of spelling out the sed commandline in the Makefile.

I got a complaint or two that some version of sed does not like ';' to concatenate more than one commands, and have been trying to train myself to do either multiple -e options or multi-line scripts. E.g when I am tempted to say:

	sed -e 's/foo/bar/;s/baz/boa/' froboz
Instead, I say either
	sed -e 's/foo/bar/' -e 's/baz/boa/' froboz
or
	sed -e '
        	s/foo/bar
                s/baz/boa/
	' froboz

I do not know how much of the above applies to your immediate problem, but I hope some of it helps.

Previous: seanNext: Petr Baudis
Message 4 of 10 in “problem installing latest cogito”
  1. dave morganJan 21, 2006
  2. Petr BaudisJan 21, 2006
  3. seanJan 21, 2006
  4. Junio C HamanoJan 21, 2006
  5. Petr BaudisJan 21, 2006
  6. dave morganJan 21, 2006
  7. dave morganJan 21, 2006
  8. Petr BaudisJan 21, 2006
  9. Petr BaudisJan 21, 2006
  10. seanJan 21, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.