linux下编写shell获取指定目录下的文件名

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