尝试的脚本:
cd $pathname
ls $pathname > folderlist
chmod 774 folderlist
cat folderlist
t=0
while read LINE
do
folder_list[$t]=$LINE
t=`expr $t + 1`
done < $folderlist
错误提示:
line 14: folderlist: Permission denied
chmod: cannot access `folderlist': No such file or directory
cat: folderlist: No such file or directory
draft.sh: line 23: $folderlist: ambiguous redirect