shell两行合并成一行
2015-11-27 16:28
876 查看
awk '{if(NR%2==0){printf $0 "\n"}else{printf "%s:",$0}}' file
sed 'N;s/\n/ :/' file
本文出自 “良子” 博客,谢绝转载!
sed 'N;s/\n/ :/' file
本文出自 “良子” 博客,谢绝转载!
相关文章推荐
- 用shell脚本写一个for循环
- shell用到的命令
- 在mysql中执行shell命令
- Shell case正则匹配法
- shell函数
- linux shell “(())” 双括号运算符使用
- CentOS 设置快捷键启动Shell终端
- Hbase常用Shell命令
- crontab定时器(包括执行shell)
- linux在shell中获取时间
- shell 脚本查看网段ip使用情况
- 编写一个简单的SHELL脚本
- shell条件与循环
- Bash 会清空从父进程继承来的 OLDPWD
- shell基础
- shell脚本里获取字符串的最后一个字符
- shell字符串和数组
- shell date 获取日期
- shell运算
- PowerShell GUI 之 如何快速查询