根据提供的文件名文本,查找指定目录下的该文件,找到后复制到指定文件夹--bash
2016-05-31 21:07
961 查看
#!/bin/bash
#by zzh_my@163.com
#根据提供的文件名文本,查找指定目录下的该文件,找到后复制到指定文件夹。
filecontent=`cat name50.txt`
#echo $filecontent
#取得文件内容的每一行
for fileline in $filecontent
do
echo $fileline
# echo `find */*/*aA.T02 -name $fileline`
cp $(echo `find */*/*aA.T02 -name $fileline`) ../../16-2raw_deal/
done
#by zzh_my@163.com
#根据提供的文件名文本,查找指定目录下的该文件,找到后复制到指定文件夹。
filecontent=`cat name50.txt`
#echo $filecontent
#取得文件内容的每一行
for fileline in $filecontent
do
echo $fileline
# echo `find */*/*aA.T02 -name $fileline`
cp $(echo `find */*/*aA.T02 -name $fileline`) ../../16-2raw_deal/
done
相关文章推荐
- Powershell
- xshell项目服务器命令
- Linux shell function study
- 无shell情况下的mysql远程mof提权利用方法详解
- nginx 防 webshell 跨目录
- adb 启动指定的activity
- Bash shell command 速查手册
- 常见linux命令释义(第九天)—— Bash Shell 的操作环境Shell 中的管道命令一些管道命令
- Hash table in PowerShell
- Linux Shell的常用命令
- linux脚本Shell之awk详解(二)
- Linux shell 实现一键绑定多个网卡
- Shell基础 学习
- shell 编写脚本批量ping ip
- shell中的括号与引号
- [Android] 为Android安装BusyBox —— 完整的bash shell
- shell 两数相减取正值
- Linux Shell产生16进制随机数
- 巧用vim+sed整理shell脚本文件
- shell脚本的调试(trap、tee、shell选项)