STR=1.0.4-1ubuntu0.16.10.1 PREFIX=$(shell echo $(STR) | head -c 5) SUFFIX=$(shell echo $(STR) | tail -c 10) default: @echo "string: \033[92m$(STR)\033[0m" @echo "prefix: \033[92m$(PREFIX)\033[0m" @echo "suffix: \033[92m$(SUFFIX)\033[0m"