1
我写了一个脚本来做一些备份。有一个if
区块要求确认:如何在bash脚本中添加一个信号?
read -p "Do you want to continue? [y/n]" confirm
if [[ ${confirm} == "n" ]]; then
# do something like CTRL+Z, and halt until I run fg <job number> to activate this script
else
# do some stuff
fi
任何人都可以帮忙吗?