linux下編寫shell獲取指定目錄下的文件名

#!/bin/sh #============ get the file name ===========# FolderPath="/home/data" for fileName in ${FolderPath}/*; do tempFile=`basename $fileName` echo $tempFile done #==========
相關文章
相關標籤/搜索