gpt4 book ai didi

linux - 导致用户注销的 Bash 脚本

转载 作者:太空宇宙 更新时间:2023-11-04 09:05:26 25 4
gpt4 key购买 nike

<分区>

在下面的脚本中,当 if 语句中的代码被执行时,用户将从 bash 中注销。这是为什么?

#!/bin/sh  
if [ -z $1 ]; then
echo "1"
read w
exit 1
fi
if [ "$#" -gt "1" ]; then
echo "1"
read w
exit 2
fi
export PTSUSER=$1.
<some more code>

25 4 0
文章推荐: html - 如何在不使用字体粗细属性的情况下在 Firefox 中呈现 Open Sans Semibold
文章推荐: python - 你如何使用pygame创建按钮?
文章推荐: java - KieScanner 无法从自定义 Maven 存储库获取最新的 Jars - Maven - 3.6.3
文章推荐: javascript - 如何让 保持固定高度? Bootstrap 4