Replace every occurrence of one string with another.
Section: Text and list functions
subst replace text
makefile
makefile
OUT := $(subst src/,build/,$(SRC))Explanation
Useful for path rewrites and simple string replacement.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Text and list functions