gnu make https://www.gnu.org/software/make/manual/make.html#toc-Functions-for-Transforming-Text has sort function. The description for the sort function states that sort function
Sorts the words of list in lexical order, removing duplicate words. The output is a list of words separated by single spaces.
I created a test makefile like this
TEST="this is a test test test test test"
all:
@echo $(sort $(TEST))
My output is This is a test test
The duplicates were not entirely removed from the string! Am I interpreting the sort function incorrectly? Or is it a bug with gnu make?
"This is a test test test test"becomes"This is a test test"which the shell prints asThis is a test test. - Betasortdoesn't sort within a quoted string, but does remove duplicates therein... - BetaTESTvariable contains 5 different words:"this,is,a,testandtest". And only thetestword is duplicated. - Renaud Pacalet