0
여기
쉘 스크립트입니다":?" 이 셸 명령에서 의미가 있습니까?
#!/bin/bash
version="0.01";
fibonacci() {
n=${1:?If you want the nth fibonacci number, you must supply n as the first parameter.}
if [ $n -le 1 ]; then
echo $n
else
l=`fibonacci $((n-1))`
r=`fibonacci $((n-2))`
echo $((l + r))
fi
}
for i in `seq 1 10`
do
result=$(fibonacci $i)
echo "i=$i result=$result"
done
그리고 난이 라인에 대한 혼란에 와서 :
n=${1:?If you want the nth fibonacci number, you must supply n as the first parameter.}
내가 쉘의 매뉴얼을 보이지만, 무엇에 대해 아무것도 얻을 수 없습니다 "를?" 실제로 의미합니다.
사람의 강타 THX