I use a Makefile for web development, where I compile scss (sass) files to css and I want to add a banner (header with date, version, copyright info, git branch etc) to the compiled file.
While I finally managed to achieve this, when I open the result there is <feff>
displayed at the joining position.
The Makefile is like this:
BANNER:=\
"/**\n"\
" * @project $(PROJECT_NAME)\n"\
" * @author John Doe <j.doe@example.com>\n"\
" * @build $(DATE)\n"\
" * @copyright Copyright (c) " $(shell date +%Y) ", <Example Inc.>\n"\
" */\n"\
"\n"
css: $(CSS_DEST_DIR)/main.css
$(call colorecho, 3, $(shell du -h $^))
$(CSS_DEST_DIR)/main.css: $(CSS_SRC_DIR)/main.scss $(CSS_SRC_FILES)
@mkdir -p $(CSS_DEST_DIR)
$(call colorecho, 3, "Compiling $@");
$(eval TMPFILE := $(shell mktemp))
@-$(SASS_COMPILER) $(SASS_COMPILER_OPTIONS) -o $(TMPFILE) $<
@echo $(BANNER) | cat - $(TMPFILE) > $@
And the resulting file looks like this in vim:
/**
* @project data-al
* @author Johannes Braun <j.braun@agentur-halma.de>
* @build 2018-12-13-1619
* @release gitRevSync.long() + gitRevSync.branch()
* @copyright Copyright (c) 2018 , <HALMA GmbH & Co. KG>
*/
<feff>.button,.button--primary,.cookie-notification__accept,.search-form__submit,.mobnav__trigger,.mobnav__button{padding:0;...
od -a
outputs
0000400 nl <EF> <BB> <BF> . b u t t o n , . b u t
When I do the same on the bash command line, everything is ok. I am on OSX btyw.
How could I get rid of this? Thanks for your help