【发布时间】:2013-10-21 14:40:48
【问题描述】:
谁能解释使用read i 的部分。 i 是从哪里来的。
scp -i ~/.ssh/id_rsa.sample gaara@stuid.student.com:ready/$2/*.zip ./$2 > slate.out 2>&1
ls -1 $2/* > curr.lst 2>/dev/null
while
read i
do
if
test -e ../done/"$i"
then
diff "$i" ../done/"$i" >/dev/null 2>&1
if
test $? -eq 0
then
rm "$i"
fi
fi
done < curr.lst
【问题讨论】:
-
对此的简短回答是否。 有大量可用于 Bash、scp、diff 和该脚本的所有其他部分的文档。如果您对部分语法有具体的问题,请修改您的问题并这样说。
-
我知道这有点要求,但我被严重卡住了。而使用
read i的部分我不知道i是从哪里来的。 -
read 命令正在从您在最后指定的文件描述符中读取数据...