sed can read files; you don't have to 'cat' them to it

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Sat Feb 16 08:45:42 PST 2013


Here's an example:

$(NSIFILE): $(NSIINPUTFILE)
	$(shell cat $(NSIINPUTFILE) | sed -e 's/VERSIONTOKEN/$(VERSION_STRING)/;s/PRODVTOKEN/$(PRODVERSION_STRING)/' > $(NSIFILE))

I would do it like this, instead:

	$(shell sed -e 's/VERSIONTOKEN/$(VERSION_STRING)/;s/PRODVTOKEN/$(PRODVERSION_STRING)/' $(NSIINPUTFILE) >$(NSIFILE))

unless there's a good reason for keeping it as is (I don't do windos nor
mac).


Cheers,

-- 
Cristian


More information about the subsurface mailing list