【发布时间】:2017-09-30 13:55:38
【问题描述】:
我使用下面的这个脚本在每次运行时随机更改 mac 地址。
openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//' | xargs sudo ifconfig en0 ether
ifconfig en0 | grep ether
我希望 Automator 为我做这件事。当我运行这个 Shell 脚本时,它运行成功,但是当我实际打开终端并运行时
ifconfig en0 | grep ether
查看它是否更改了 MAC 地址,我发现它没有。
如果我手动将此类脚本输入到终端,它会完美运行。 我该怎么办?
【问题讨论】:
标签: bash macos shell terminal automator