Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos Bash输出到位置_Macos_Bash - Fatal编程技术网

Macos Bash输出到位置

Macos Bash输出到位置,macos,bash,Macos,Bash,此脚本输出稀疏磁盘映像。我想把图像放在系统的正确位置,但不知道如何给它一个位置。我不希望在创建后移动它 #!/bin/bash hostname=`hostname -s` mac=`ifconfig en0 | grep ether | tr -d ":" | awk {'print $2'}` hdiutil create -size 300g -type SPARSE -fs HFS+ "$hostname"_"$mac" 工作 /Volume/location/"$hostname"_

此脚本输出稀疏磁盘映像。我想把图像放在系统的正确位置,但不知道如何给它一个位置。我不希望在创建后移动它

#!/bin/bash
hostname=`hostname -s`
mac=`ifconfig en0 | grep ether | tr -d ":" | awk {'print $2'}`
hdiutil create -size 300g -type SPARSE -fs HFS+ "$hostname"_"$mac"
工作

/Volume/location/"$hostname"_"$mac"