首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

怎么用shell获取linux目录下的文件名呢

2013-10-21 
如何用shell获取linux目录下的文件名呢?#!/bin/bashFOLDER_A/home/joe/test/aFOLDER_B/home/joe/test/bf

如何用shell获取linux目录下的文件名呢?
#!/bin/bashFOLDER_A=/home/joe/test/aFOLDER_B=/home/joe/test/bfor file_a in ${FOLDER_A}/*; do file_a_prefix=${file_a:%.*} file_prefix=${file_a_prefix#${FOLDER_A}/*} #rm -f $FOLDER_B/${file_prefix}.* cp $file_a $FOLDER_B/done

?

热点排行
Bad Request.