可乐博客

有效解决mac突然黑屏问题

#!/usr/bin/expect -f
set password ****
spawn sudo nvram SystemAudioVolume=%00
expect "Password:"
send "$password\r"
spawn sudo nohup caffeinate &
expect "Password:" {send "$password\r"}
interact
随笔