Shell split character line by line
while read line
do
account=`echo "$line"| cut -c1-9`'|'
account+=`echo "$line"| cut -c10-44`'|'
account+=`echo "$line"| cut -c45-45`'|'
account+=`echo "$line"| cut -c49-79`'|'
account+=`echo "$line"| cut -c47-49`'|'
account+=`echo "$line"| cut -c80-82`'|'
account+=`echo "$line"| cut -c83-117`'|'
account+=`echo "$line"| cut -c47-49`'|'
account+=`echo "$line"| cut -c118-147`'|'
account+=`echo "$line"| cut -c148-149`'|'
account+=`echo "$line"| cut -c150-158`'|'
account+=`echo CITI`
echo "$account" >> $SYB_DATA/Pershing/processed/HnwFeedAcct.dat
done < $SYB_DATA/Pershing/processed/Prsh_FeedAcct.dat
Shell split character line by line的更多相关文章
- Bash Shell read file line by line and substring
#read one file line by line for line in $(cat test1.txt); do echo $line ; done; #while read split li ...
- Shell脚本:while read line无法读取最后一行的问题
[1]Shell脚本:while read line无法读取最后一行的问题 刚刚利用shell脚本处理日志文件时,发现了一个问题:while read line无法读取到最后一行 通过编辑器可以看到待 ...
- Java 8 Stream – Read a file line by line
In Java 8, you can use Files.lines to read file as Stream. c://lines.txt – A simple text file for te ...
- shell (check return of each line)and sudoer
shell result from cmdline echo $? if 0 then success ;else failure (shell 执行每部返回值,rm -rf 错误,打包不能覆盖) 解 ...
- shell (check return of each line)(PIPESTATUS[@])and sudoer
shell result from cmdline echo $? if 0 then success ;else failure (shell 执行每部返回值,rm -rf 错误,打包不能覆盖) 我 ...
- shell split分析日志文件
在处理的文件comment有如下格式: ............................ xxx.xxx.10.59 db1059 mynbdpdatadb.idc4. dbname R620 ...
- shell split函数的使用
#!/bin/awk -f BEGIN{FS=","} {split($1,name," "); for (i in name) print name[i] }
- 刷题中熟悉Shell命令之Tenth Line和Transpose File [leetcode]
首先介绍题目中要用的4个Shell命令 sed awk head tail的常用方法.(打好地基,才能建成高楼!) sed:(转自:http://www.cnblogs.com/barrychiao/ ...
- 如何在Windows下开发Python:在cmd下运行Python脚本+如何使用Python Shell(command line模式和GUI模式)+如何使用Python IDE
http://www.crifan.com/how_to_do_python_development_under_windows_environment/ 本文目的 希望对于,如何在Windows下, ...
随机推荐
- C#用链式方法
C#用链式方法表达循环嵌套 情节故事得有情节,不喜欢情节的朋友可看第1版代码,然后直接跳至“三.想要链式写法” 一.起缘 故事缘于一位朋友的一道题: 朋友四人玩LOL游戏.第一局,分别选择位置:中 ...
- Fedora 问题总结第二季
该系列主要是记录自己使用fedora发现的问题. 1Linux Error: curses.h: No such file or directory Problem Solution sudo yum ...
- 首个spring mvc 测试例子搭建遇到问题记录
开发环境:jdk1.7 + tomcat7 + Eclipse Juno 首先下载spring 相关jar包 我用的是 spring-framework-3.2.1.RELEASE 下载地址:http ...
- asp于Server.MapPath用法
总是忘记Server.MapPath的用法,以下记录了,以后使用: 总注:Server.MapPath获得的路径都是server上的物理路径,也就是常说的绝对路径 1.Server.MapPath(& ...
- 内网穿透神器ngrok(转)
相信做Web开发的同学们,经常会遇到需要将本地部署的Web应用能够让公网环境直接访问到的情况,例如微信应用调试.支付宝接口调试等.这个时候,一个叫ngrok的神器可能会帮到你,它提供了一个能够在公网安 ...
- J2EE开发框架搭建(2) - springmvc4 + spring4 + hibernate4 整合
1. 打开hqhop-framework-parent项目下的pom.xml文件.加入springmvc4 , spring4 , hibernate4 ,以及数据源druid的依赖包,插件,依赖包版 ...
- HDU1849 Rabbit and Grass()
用异或看取得的值是否为0推断 思想换没搞懂 #include<stdio.h> int main() { int ans,n,a; while(scanf("%d",& ...
- oracle在desc表时,name 和type列不能格式化问题(占位过长)
今天玩Oracle的时候,遇到一个让人很无语的问题,我desc表的时候,总是发现name列和type 列占位太多, 无法很直观明白的显示出来各个列值,就像下面的样子: 这样让人很不舒服,当然,一看到列 ...
- maven项目配置Project Facets时further configuration available不出来问题
如果下边的 further configuration available不出来 把Dynamic web module 去掉勾选,应用与项目,然后再点开项目的properties,再选中Dynami ...
- shell 调试
感觉编写shell在查找错误的过程中,很让你崩溃,还好shell也提供了一些调试的方式: 语法检查 -n选项做语法检查,而不执行脚本 sh -n script_name.sh 启动 ...