我想为每个命令记录下面的脚本,无论是成功还是失败。我相信在shell脚本中我们有命令$?
来知道执行的命令是成功还是失败。有没有办法在批处理脚本中实现它?
open server
username
Password-1
bin
cd \Current_QA_DataLoad
put E:\AccountsInitialV6.txt
PAUSE
bye
提前致谢 维克拉姆
答案 0 :(得分:2)
不确定
yourCommand && (
commands to execute upon success
) || (
commands to execute upon failure
)