Shell variable issue when trying to mkdir

前端 未结 3 1179
遇见更好的自我
遇见更好的自我 2021-01-02 00:32

Any ideas what is wrong with this code?

CLIENT_BUILD_DIR=\"~/Desktop/TempDir/\"

if [ ! -d $CLIENT_BUILD_DIR ]
then
   {
      mkdir $CLIENT_BUILD_DIR
   }
f         


        
3条回答
  •  说谎
    说谎 (楼主)
    2021-01-02 01:13

    mkdir ${CLIENT_BUILD_DIR} will do. No directory will be created if it already exists.

提交回复
热议问题