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. 数据库commit问题

    对数据库进行修改后,需要commit!---之前也是忘记commit导致数据库反应不过来.

  2. Bootstrap 的 Dropdown

    一.简介 Dropdown 就是下拉列表,这里 有一个例子. Dropdown 的完整代码如下: <div id="dropdownWrapper"> <butt ...

  3. C# winForm 开机自动启动 并启动后最小化到任务栏 右侧通知栏并交互操作

    //设置自动启动 string path = Application.StartupPath; SettingHel.SetAutoRun(path +@"\MostImpressive.D ...

  4. .NET 图片转base64

    //图片 转为 base64编码的文本 private string ImgToBase64String(string Imagefilename) { try { Bitmap bmp = new ...

  5. Input is not proper UTF-8, indicate encoding !错误处理

    xml 中如果包含部分 ascii 控制字符(小数字)则 chrome会报告如下类型错我: This page contains the following errors: error on line ...

  6. 正经学C#_布尔运算[布尔值与其布尔运算符]:《c#入门经典》

    前面几个章节简述了 C#中得常用得算术运算符.这一章节说布尔值与其布尔运算符. 布尔值在c#中表示方式是 bool类型,这个类型可以储存两个值,true或者false,或者真或者假,可以说0或者1. ...

  7. TeamLeader管理方法

    1. 规划 在加强质量的同时,提升团队业务理解能力推动产品经理深入度增加业务监控 2. 洗脑 现在离开去bat,前两年会学习,但可能无人带领待3-5年,做到B类从基金学习起,学习金融学习架构设计提升团 ...

  8. 解决Eclipse 启动后总是Building WorkSpace(sleeping) Java报错和处理

    发布者:Lynn..   时间:2016-12-20 13:13:55       今天打开eclipse后eclipse总是在Building WorkSpace(sleeping),我的解决方案是 ...

  9. 10.15 lzxkj

    几天前写的,忘了放了,在此填坑 10月16的题我出的不写题解了 lzxkj 题目背景 众所不周知的是, 酒店之王 xkj 一个经常迷失自我的人 有一天, 当起床铃再一次打响的时候, TA 用 O(1) ...

  10. [USACO08OCT]牧场散步Pasture Walking BZOJ1602 LCA

    题目描述 The N cows (2 <= N <= 1,000) conveniently numbered 1..N are grazing among the N pastures ...