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

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -