#!/bin/sh
#while true
#do
cd /mnt/vfw/third_meteor
for sub in `ls`
do
cd /mnt/vfw/third_meteor/${sub}/GRIDFILE
for file in `ls |grep back`
do
cd /mnt/vfw/third_meteor/${sub}/GRIDFILE/${file}
for pvd in `ls -lrt | grep ^d | awk '{print $9}'`
do
cd /mnt/vfw/third_meteor/${sub}/GRIDFILE/${file}/${pvd}
if [ -d /home/centos/mnt/vfw/third_meteor/${sub}/GRIDFILE/${file}/${pvd} ];
then
for file_last in `ls -rlt *.PVD|tail -n 3 | awk '{print $9}'`
do
echo ${file_last}
#cp -rp *.PVD /home/centos/mnt/vfw/third_meteor/${sub}/GRIDFILE/${file}/${pvd}
cp -rp $file_last /home/centos/mnt/vfw/third_meteor/${sub}/GRIDFILE/${file}/${pvd}
done
else
mkdir -p /home/centos/mnt/vfw/third_meteor/${sub}/GRIDFILE/${file}/${pvd}
fi done
done done
#sleep 900
#done

  

shell 脚本示例的更多相关文章

  1. shell脚本示例:计算毫秒级、微秒级时间差

    bash&shell系列文章:http://www.cnblogs.com/f-ck-need-u/p/7048359.html 有时候需要计算命令的执行时间长度,可以使用time命令,虽然t ...

  2. shell脚本示例:批量比较多个文件的内容是否相同

    bash&shell系列文章:http://www.cnblogs.com/f-ck-need-u/p/7048359.html 要比较两个文件的内容是否完全一致,可以简单地使用diff命令. ...

  3. Shell脚本编程30分钟入门

    Shell脚本编程30分钟入门 转载地址: Shell脚本编程30分钟入门 什么是Shell脚本 示例 看个例子吧: #!/bin/sh cd ~ mkdir shell_tut cd shell_t ...

  4. shell脚本入门

    什么是Shell脚本 示例 看个例子吧: #!/bin/sh cd ~ mkdir shell_tut cd shell_tut for ((i=0; i<10; i++)); do touch ...

  5. Linux SHELL脚本

    在Linux系统中,虽然有各种各样的图形化接口工具,但是sell仍然是一个非常灵活的工具.Shell不仅仅是命令的收集,而且是一门非常棒的编程语言.可以通过使用shell使大量的任务自动化,shell ...

  6. 将 shell 脚本打包到 rpm 包中

    下以操作最好在虚拟机上操作:如 Docker 最方便了 1. 安装 rpmbuild yum -y install rpmbuild  rpmdevtools -y 2. 生成打包路径 使用 rpmd ...

  7. 30分钟快速学习Shell脚本编程

    什么是Shell脚本 示例 看个例子吧: #!/bin/sh cd ~ mkdir shell_tut cd shell_tut for ((i=0; i<10; i++)); do touch ...

  8. Shell脚本编程学习入门 02

    Shell脚本编程学习入门是本文要介绍的内容,我们可以使用任意一种文字编辑器,比如gedit.kedit.emacs.vi等来编写shell脚本,它必须以如下行开始(必须放在文件的第一行):   #! ...

  9. SHELL脚本编程基础知识

    SHELL脚本编程基础知识 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. Linux之父Linus有一句话很经典:"Talk is cheap, show me the ...

随机推荐

  1. pom文件报错org.apache.maven.archiver.mavenarchiver.getmanifest

    eclipse导入新的maven项目时,pom.xml第一行报错: org.apache.maven.archiver.MavenArchiver.getManifest(org.apache.mav ...

  2. 【原创】运维基础之Nginx(1)简介、安装、使用

    官方:http://nginx.org nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a ...

  3. 1、Filebeat概述

    Filebeat是一个轻量级的日志托运工具,用于转发和集中日志数据. Filebeat作为代理安装在服务器上,监控指定的日志文件或目录,收集日志事件,并将它们转发到Elasticsearch或Logs ...

  4. All about Using Burp Suite

    1.how  to use burpsuite I can't thank them enough for allowing us to test web application ,making su ...

  5. C语言对字符串去重

    # include <stdio.h> # include <string.h> char * getNewChar(char * str,char * newStr); in ...

  6. 修正锚点跳转位置 避免头部fixed固定部分遮挡

    如下锚点标签: <div id="id1"> <span class="kkAnchor"></span> 正文正文正文正文 ...

  7. Redis数据类型String

    set和get Set带空格的字符串值,这时候就需要使用双引号了,否则会出错 getset getset设置某个key-value,然后把设置之前的值返回来 incr,incrby 和 decr,de ...

  8. mybatis 开发规范

  9. React实现局部刷新

    [项目结构] 流程: 入口文件 -> 路由 -> layout -> Analysi/Monitor/Workspace 1.入口文件 -> src/index.js 2.组件 ...

  10. 执行Python出现LookupError: unknown encoding: cp65001解决办法

    执行Python出现LookupError: unknown encoding: cp65001错误 dos下执行以下命令即可 chcp 以上.