问题解决了,多谢!!!
#!/bin/shtar czvf $1.$(date +%Y%m%d%-H%M%S).tgz $1
exit $? $? means "Expands to the exit status of the most recently executed foreground pipeline". $?是指上一条命令的返回值。 if $? returns 0 means the last command was good
if it is something else
mean last command was bad 0 则说明成功
非0 则说明失败。
页:
[1]