dragoncgs 发表于 2005-11-9 16:40:01

问题解决了,多谢!!!

#!/bin/sh
   tar czvf $1.$(date +%Y%m%d%-H%M%S).tgz $1
   exit $?

sunxiaobo 发表于 2005-11-9 20:00:50

$? means "Expands to the exit status of the most recently executed foreground pipeline".

zhy2111314 发表于 2005-11-9 20:42:55

$?是指上一条命令的返回值。

ivyharry 发表于 2005-11-10 00:53:31

if $? returns 0 means the last command was good
if it is something else
mean last command was bad

ccsu 发表于 2005-11-19 20:26:54

0 则说明成功
非0 则说明失败。
页: [1]
查看完整版本: 问题解决了,多谢!!!