问题解决了,多谢!!!

问题解决了,多谢!!!

#!/bin/sh
   tar 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 则说明失败。
曾經都已成為過去,而現在卻能成就未來.