I was writing a script for /bin/sh to be used on a 10.3 box when I noticed a strange output for mkdir(1). I simply wanted mkdir(1) to make two folders.
FreeBSD 10.3 in sh(1)
It instead makes a folder called '{test1,test2}', which is what I don't want.
Running this on Manjaro Linux sh(1)
I always though sh(1) code was supposed to be portable but what am I missing here?
FreeBSD 10.3 in sh(1)
Code:
$ mkdir -p -v /tmp/{test1,test2}
/tmp/{test1,test2}
It instead makes a folder called '{test1,test2}', which is what I don't want.
Running this on Manjaro Linux sh(1)
Code:
sh-4.3$ mkdir -p -v /tmp/{test1,test2}
mkdir: created directory '/tmp/test1'
mkdir: created directory '/tmp/test2'
I always though sh(1) code was supposed to be portable but what am I missing here?