awk:
split($1, arr, “\t”)
 
sed:
sed -n '42p' file
sed '42d' file
sed 's/replace_pattern/replace_str/g' file
sed '/remove_pattern/d' file
sed -i file #(inplace)直接修改读取的文件内容,而不是输出到终端
 
xargs:
xargs -n1 -i cmd {} 
 
bash:
  • $HOSTNAME - The hostname of the machine the script is running on.
  • Single quotes will treat every character literally.
  • Double quotes will allow you to do substitution (that is include variables within the setting of the value).
  • read varNameRead input from the user and store it in the variable varName./dev/stdinA file you can read to get the STDIN for the Bash script
  • $(( expression )) Return the result of the expression. ${#var} Return the length of the variable var.
 

awk, sed, xargs, bash的更多相关文章

  1. awk sed 总结

    Awk总结笔记 介绍 90年代 new awk :nawk Linux 的是gawk 我们简化awk 用法 #  awk [options ] ‘scripts’ file1 file2 .... # ...

  2. 【linux系统】命令学习(六)awk sed grep 与管道的使用

    程序运行环境输入与输出 标准输入0 read a;echo $a 标准输出1 echo cesh 错误输出 ls notr 管道重定向 管道与管道之间可以重定向 管道与文件之间可以重定向 用于写入 将 ...

  3. <转>如何利用多核CPU来加速你的Linux命令 — awk, sed, bzip2, grep, wc等

    原文链接:http://www.vaikan.com/use-multiple-cpu-cores-with-your-linux-commands/ 你是否曾经有过要计算一个非常大的数据(几百GB) ...

  4. 转摘--如何利用多核CPU来加速你的Linux命令 — awk, sed, bzip2, grep, wc等

    http://www.vaikan.com/use-multiple-cpu-cores-with-your-linux-commands/ 你是否曾经有过要计算一个非常大的数据(几百GB)的需求?或 ...

  5. 如何利用多核CPU来加速你的Linux命令 — awk, sed, bzip2, grep, wc等(转)

    你是否曾经有过要计算一个非常大的数据(几百GB)的需求?或在里面搜索,或其它操作——一些无法并行的操作.数据专家们,我是在对你们说.你可能有一个4核或更多核的CPU,但我们合适的工具,例如 grep, ...

  6. awk\sed\grep 补充

    # awk\sed\grep 补充 以上命令中字符 / 在sed中作为定界符使用,也可以使用任意的定界符 sed's:test:TEXT:g' sed's|test|TEXT|g' 定界符出现在样式内 ...

  7. echo\awk\sed\tee\curl的使用-shell

    echo的使用:http://man.linuxde.net/echo awk的使用:http://man.linuxde.net/awk sed的使用:http://man.linuxde.net/ ...

  8. 【转】如何利用多核CPU来加速你的Linux命令 — awk, sed, bzip2, grep, wc等

    如何利用多核CPU来加速你的Linux命令 — awk, sed, bzip2, grep, wc等   你是否曾经有过要计算一个非常大的数据(几百GB)的需求?或在里面搜索,或其它操作——一些无法并 ...

  9. linux的文件处理(匹配 正则表达式 egrep awk sed)和系统、核心数据备份

    文件处理 1.处理方式 匹配 正则表达式 egrep awk sed 2.文件中的处理字符 \n  新行符 换行 \t  制表符 tab键 缺省8个空格 \b  退格符 backspace键 退格键 ...

随机推荐

  1. Mybatis避免出现语法错

    在使用MyBatis的时候,可能会看起来没有问题,但是代码运行的时候出现意想不到的错误. 看如下代码: <update id="updateByPrimaryKeySelective& ...

  2. Java_枚举类

    枚举类 枚举类不出来的时候只能如下写代码 //Student.java package cn.itcast.enumeration; public class Student { private St ...

  3. [转]delphi xe6 android屏幕操持常亮

    1) setting the Project Options, Uses Permissions, Wake lock = True 2) Adding Android.JNI.PowerManage ...

  4. JS万金油的类型判断方法

    Object.prototype.toString.call(data).slice(8, -1).toLowerCase();

  5. 微信小程序小结(5) -- 常用语法

    在 pages 字段的第一个页面就是这个小程序的首页(打开小程序看到的第一个页面). Page生命周期 属性 类型 描述 onLoad Function 生命周期函数--监听页面加载.一个页面只会调用 ...

  6. angular原理及模块简介

    Angular简介(大神可略过) Angular是一个强大的前端框架,其强大之处主要是可以把静态页面与动态数据绑定起来.平时我们看到的网页界面上面的数据都是固定,但如果我们要变化这些数据,例如我在一个 ...

  7. Java框架之单元测试

    单元测试dao层 @Test   //1.要写 test public void TestUserDao(){ ApplicationContext ctx=new ClassPathXmlAppli ...

  8. sql开发技巧总结-2

    ---恢复内容开始--- 1.如何进行行列转换 需求: 列转换成行 select a.`user_name`,sum(b.kills) from user1 a join user_kills b o ...

  9. JavaScript学习笔记——1.了解JavaScript

    百度百科: JavaScript是一种属于网络的脚本语言,已经被广泛用于Web应用开发,常用来为网页添加各式各样的动态功能,为用户提供更流畅美观的浏览效果.通常JavaScript脚本是通过嵌入在HT ...

  10. P3897 [湖南集训]Crazy Rabbit

    \(\color{#0066ff}{ 题目描述 }\) 兔子们决定在自己的城堡里安排一些士兵进行防守. 给出 n 个点的坐标,和城堡里一个圆心在原点的圆形的障碍,兔子们希望从中选出 k 个兔子,使得它 ...