shell批量处理
来源:互联网 发布:linux vi 跳到最后 编辑:程序博客网 时间:2024/06/06 14:18
将以下字符串
fat110abccafat136bcdfgfat123hell0fat122world1
转为如下形式
fat110=abccafat136=bcdfgfat123=hell0fat122=world1
方法如下:
[root@iZ23hh6yk41Z test]# cat test.txt |xargs -n 2|tr ' ' '='[root@iZ23hh6yk41Z test]# cat test.txt |xargs -n 2|awk 'BEGIN{RS=" ";ORS="="}{print}' [root@iZ23hh6yk41Z test]# sed 'N;s#\n#=#g' test.txt[root@iZ23hh6yk41Z test]# while read line;do if [ $(echo $line|grep fat|wc -l) -ne 1 ];then echo =$line;else echo -n $line;fi;done < test.txt
阅读全文
0 0
- shell批量处理
- 批量文件筛选处理shell
- 用shell 批量处理任务
- shell命令批量处理文件
- Java中执行Shell,window批量处理 .
- 博客迁移:Shell脚本批量文件处理
- 【Linux】shell--批量处理压缩包
- shell批量处理--统计和判断
- Shell 命令行批量处理图片文件名
- Java中执行Shell(.sh)和windows批量处理(.bat)
- linux 脚本(linux shell script)批量处理doc文档
- 使用shell和awk批量处理二进制数据
- 批量处理
- 批量处理
- 批量处理
- 批量处理
- 批量处理
- 批量编译shell
- 模块化的进一步
- 解决intel/caffe配置时候,mklml文件无法下载问题
- Productivity Power Tools工具
- vc++快速使用richedit控件
- IO复用
- shell批量处理
- ubuntu 16.04 测试Kinect 1 保存深度图像
- Redis常用命令
- freemarker常用内置函数
- leetcode_112. Path Sum
- 使用HttpServlet的三种方式
- 表单判断(正则)
- jmeter个人学习之路--常见问题及解决方案
- Error:ERROR ITMS-90474: "Invalid Bundle. iPad Multitasking support requires these orientations: