摘要:run2.shstart=`date`gawk '{v=FILENAME}!a[v]++1' ./source/* >./source1.txtend=`date`echo ${start}"---combine source files!---"${end}start=`date`gawk '{...
阅读全文
摘要:#!/bin/shif [ ! -x "files" ]; then mkdir sourcefiif [ ! -x "source" ]; then mkdir sourcefiif [ ! -x "target" ]; then mkdir targetfifind ./sou...
阅读全文
摘要:#!/bin/shIP=133.128.6.70USER=cjdzPASSWORD=cjdz_2013DIRECTORY=$1file=$2ftp -i -n <<FTPIT open $IP user $USER $PASSWORD binpromptcd $1lcd source/mget...
阅读全文
摘要:SED单行脚本快速参考(流编辑器)第1/2页作者: 字体:[增加减小] 类型:转载sed是一个非交互式的流编辑器。所谓非交互式,是指使用sed只能在命令行下输入编辑命令来编辑文本,然后在屏幕上查看输出sed (stream editor)功能说明:利用script来处理文本文件。语法:sed [-h...
阅读全文
摘要:《SED 单行脚本快速参考》的 awk 实现2009-12-08ToyPosted inCliTagged asawk,sedRSS{ 撰文/bones7456}sed 和 awk 都是 Linux 下常用的流编辑器,他们各有各的特色,本文并不是要做什么对比,而是权当好玩,把《SED 单行脚本快速参...
阅读全文
摘要:if [ $# -ne 2 ] ;then #判断参数个数 -ne 是not equalecho "example: ./getJC.sh filelist filedir " exitfiif [ ! -f $1 ] ;then #判断第一个参数是否是文件echo "example: ./g...
阅读全文
摘要:cat b.txt |while read line do t=$line for a in 09 10 11 do p="/data/org/$1/" find $HOME$p$t/201409/$a/* -name *.ORG.gz |...
阅读全文
摘要:rm -f source.txtrm -f target.txtrm -f source.txt.sortrm -f target.txt.sortrm -f source.logrm -f target.logrm -f result.logpwd=`pwd`find $pwd/source -t...
阅读全文
摘要:今天被分配到对账组下的字段程序的了解和修改,在 SecureCRT 下的 run.sh 是字段对账的主程序,其中run.sh文件中含有gawk的代码。 程序的主要功能为 有两个文件夹 source存的是旧的采集系统采集的话单 target是新的采集系统采集的话单 实现具体的话单字段核对步骤为将sou...
阅读全文