`
BucketLi
  • 浏览: 189496 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
博客专栏
5a76a659-f8e6-3bf3-b39a-8ae8f7a0f9d9
Percolator与分布...
浏览量:5544
社区版块
存档分类
最新评论

shell使用tips

 
阅读更多
shell for循环
引用
for m in `cat m.md`;do echo $m;done


shell互操作
引用
echo choice:$'\n' 1.a $'\n' 2.b $'\n' 3.b;read x;echo $x


查文件并且处理
引用
find /home/admin/logs/ -iname error.log | xargs cat

引用
find /home/admin/data2/zkLog/version-2 -mtime +3|xargs rm -f {}


awk值的条件判定,并打印
引用
cat /tmp/xxx | awk -F, '{source=substr($7,11,1);target=substr($8,14,1);if(source>target)print $7,$8}'


去掉某个字符
引用
sed 's/\"//g'


列求和附带字符串处理
引用
cat /tmp/xxx |awk 'BEGIN{total=0}{v=substr($4,2);total+=v}END{print total}'
分享到:
评论

相关推荐

    Linux and Unix Shell Programming

    as well as a host of tips, tricks and code one-liners, that will save you time on a day-to-day basis. The book is organized into self-contained chapters on individual topics for ease of reference. ...

    Classic Shell Scripting

    The authors are intimately familiar with the tips and tricks that can be used to create excellent scripts, as well as the traps that can make your best effort a bad shell script. With Classic Shell ...

    Voice CCIE lab tips

    memorize BASH (unix shell add a c in the middle) EMPU (electromagnetic pulse) and 1720 B - B Channel MGCP / BRQ for Gatekeeper A - AAR S - Stop Routing H323 (same as H) C - Codecs disable both 722 ...

    Shell中的文本处理工具

    1.grep ...Tips : grep -E = egrep(扩展的正则表达式) 文件内容: ##grep 格式## grep 匹配条件 处理文件 grep root passwd 过滤root关键字 grep ^root passwd 以root开头 grep root$ passwd

    bash Cookbook: Solutions and Examples for bash Users, 2nd Edition

    Shell scripting is a way to ... Tips And Traps: Common Goofs For Novices Appendix A Reference Lists Appendix B Examples Included With Bash Appendix C Command-Line Processing Appendix D Revision Control

    Bash.Cookbook.2nd.Edition.14919

    Shell scripting is a way to ... Tips And Traps: Common Goofs For Novices Appendix A Reference Lists Appendix B Examples Included With Bash Appendix C Command-Line Processing Appendix D Revision Control

    ABAP Program Tips.pdf

    7.10.14 SHELL LIST REPORT OFF A TABLE - NAST 125 7.10.15 ALV REPORT....................................130 7.10.16 SAP GENERATED REPORT \ DIALOG PROGRAM 133 7.10.17 LIST OF TRANSACTIONS REPORT...........

    awesome-mac-things:一些有用的mac东西:脚本,shell,doc,快捷键

    curl -s "https://raw.githubusercontent.com/superhj1987/awesome-mac-things/master/get.sh" | bash -s 下载源代码并make install 下载源并将bin设置到系统路径以使用常用用法shell卸载卸载用法mthings 显示系统...

    tips:“tips”是一个类似“man”的命令行帮助工具,由 GitHub 提供支持

    tips是一个man像搭载GitHub的命令行工具。 它与man共享类似的界面,但内容托管在 github 上,这意味着它是在线的且受版本控制。 用法 tips 以下是获取cal命令提示的示例: $ tips cal 1. Displays the calendar...

    FreeBSD-tools-and-tips:我正在使用的工具,脚本和技巧FreeBSD服务器

    FreeBSD工具和技巧工具,脚本和技巧我正在使用管理FreeBSD服务器。 有用的CLI / shell命令列表: 要安装的软件包列表:

    疯狂java实战演义源码-AndroidTips:https://github.com/cokuscz/AndroidTips.git

    shell keyevent 26原理和按电源键一样,模拟电源键点击事件) 参考链接: 2.genymotion模拟器如何打开输入法软键盘? 答:在设置输入法选项中,关闭物理键盘即可。 3.genymotion如何安装谷歌服务? 答: 二.Android ...

    fish-abbreviation-tips::light_bulb:帮助您记住缩写

    当您可以使用缩写和别名时,通过显示提示来帮助您记住缩写和别名 :check_mark_button: 要求 3.1.0+ :rocket: 安装 使用安装: fisher install gazorby/fish-abbreviation-tips :wrench: 用法 只需正常使用外壳...

    Linux运维趋势第十一期

    技巧·Tips 020 小技巧:在Linux下生成crypt加密密码 021 当 Shell 遇见 Emacs 工具·Tools 023 Linux运维监控之Smokeping 分布式 运维DBA·Database 025 教你五招,快速提升MySQL可扩展性 脚本·Shell 026 Shell...

    vi+Emacs+GCC+Make+GDB+Bash经典书籍

    这些书籍涵盖了从vi,emacs(编辑器), gcc(编译器), make(工程项目管理), gdb(调试),bash(使用最广泛的shell)等unix环境下开发所需的大部分工具的基本使用和高级功能等.基本上是某方面最经典最权威的著作.如Debugging+...

    vi+Emacs+GCC+Make+GDB+Bash经典书籍1

    这些书籍涵盖了从vi,emacs(编辑器), gcc(编译器), make(工程项目管理), gdb(调试),bash(使用最广泛的shell)等unix环境下开发所需的大部分工具的基本使用和高级功能等.基本上是某方面最经典最权威的著作.如Debugging+...

    vi+Emacs+GCC+Make+GDB+Bash经典书籍2

    这些书籍涵盖了从vi,emacs(编辑器), gcc(编译器), make(工程项目管理), gdb(调试),bash(使用最广泛的shell)等unix环境下开发所需的大部分工具的基本使用和高级功能等.基本上是某方面最经典最权威的著作.(还有一本是...

    vi+Emacs+GCC+Make+GDB+Bash经典书籍8

    这些书籍涵盖了从vi,emacs(编辑器), gcc(编译器), make(工程项目管理), gdb(调试),bash(使用最广泛的shell)等unix环境下开发所需的大部分工具的基本使用和高级功能等.基本上是某方面最经典最权威的著作.(还有一本是...

    vi+Emacs+GCC+Make+GDB+Bash经典书籍6

    这些书籍涵盖了从vi,emacs(编辑器), gcc(编译器), make(工程项目管理), gdb(调试),bash(使用最广泛的shell)等unix环境下开发所需的大部分工具的基本使用和高级功能等.基本上是某方面最经典最权威的著作.(还有一本是...

Global site tag (gtag.js) - Google Analytics