shell - Tab space following \ when using mkdir causing wrong directory created -
when use below script, [tab] causes mkdir combine multiple calls together:
#ends \[tab] screws bill subtestcase := \ zack \ jill \ jack \ tom \ #bill gets placed in wrong folder #because directly follows subtestcase testcases := \ $(subtestcase)\ bill \ jane test: mkdir -p $(addprefix hello/,$(testcases))
the above script creates hello\jack, hello\jane, hello\jill, hello\tom, hello\zack,
but weirdly creates "hello\ hello\bill". there mkdir flags, modes, or syntax can use when reads "[tab]" doesn't create hello\ hello\bill, rather hello\bill. thanks
i don't understand mean "a tab"; tab in script?
anyway, can use $(strip ...)
function rid of extraneous whitespace:
test: mkdir -p $(addprefix hello/,$(strip $(testcases)))
Comments
Post a Comment