遍歷/root/321321/目錄顯示裏面的全部文件bash
1 #!/bin/bash 2 dir=`ls /root/321321/` #定義遍歷的目錄 3 for i in $dir 4 do 5 echo $i 6 done