QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1127|回复: 4

问题解决了,多谢!!!

[复制链接]
发表于 2005-11-9 16:40:01 | 显示全部楼层 |阅读模式
#!/bin/sh
   tar czvf $1.$(date +%Y%m%d%-H%M%S).tgz $1
   exit $?
发表于 2005-11-9 20:00:50 | 显示全部楼层
$? means "Expands to the exit status of the most recently executed foreground pipeline".
回复

使用道具 举报

发表于 2005-11-9 20:42:55 | 显示全部楼层
$?是指上一条命令的返回值。
回复

使用道具 举报

发表于 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
回复

使用道具 举报

发表于 2005-11-19 20:26:54 | 显示全部楼层
0 则说明成功
非0 则说明失败。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-7-3 11:06 , Processed in 0.133854 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表