1
#====================script 5 -- ls reccurssive avec cd =======
#!/bin/bash
exec 2>/dev/null # redirige stderr pour toute la suite
# au cas ou le script est invoque sans argument $1
# n'existe pas, la commande suivante devient cd .
cd ${1:-.} # problem that i miss understood
for i in * ; do
if [ -d $i ] ; then
echo "$PWD/$i/ <-- repertoire"
$0 $i # le script s'invoque lui-même
else
echo $PWD/$i
fi
done
================================ ===================
有人可以向我解釋這個CD $ {1: - 。}什麼是指如何使用它,如果有任何文章解釋這個
你的問題已經包含在法文答案。 – Cyrus