Closed mweibel closed 12 years ago
Hi!
On Tue, May 15, 2012 at 8:02 AM, Michael Weibel reply@reply.github.com wrote:
sed: 1: "/vsn/ {s/.*,\s*"\([0-9] ...": extra characters at the end of p command
when building on OSX
I don't have access to any OSX box.
Could you try the solution referenced at
http://superuser.com/questions/256898/sed-syntax-to-remove-xml
AFAICS it is basically splitting the expression into several, introducing more -e and quoting each part.
Thanks!
Best, Per
Reply to this email directly or view it on GitHub: https://github.com/avtobiff/erlang-uuid/issues/3
Does that work for you:
diff --git a/Makefile b/Makefile
index 8cbfbbf..fbeaa22 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
#!/usr/bin/make -f
APPFILE := uuid.app
-VERSION := $(shell sed -n '/vsn/ {s/.*,\s*"\([0-9][0-9.]*\)".*/\1/; p}' \
+VERSION := $(shell sed -n -e '/vsn/ {s/.*,\s*"\([0-9][0-9.]*\)".*/\1/' -e 'p' -e '}' \
src/$(APPFILE).src)
PREFIX ?= /usr
This works on GNU as well.
Thank you!
Closing this issue.
Just add ;
symbol before }
For example:
VERSION := $(shell sed -n '/vsn/ {s/.*,\s*"\([0-9][0-9.]*\)".*/\1/; p;}' \
I'm testing similar code on OS X Maverics.
sed: 1: "/vsn/ {s/.*,\s*"\([0-9] ...": extra characters at the end of p command
when building on OSX