`
coobee
  • 浏览: 2509 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

linux shell script 的一些总结

阅读更多

获得本机inet IP:/sbin/ifconfig eth0|grep 'inet addr'|sed 's/^.*addr://g'|sed 's/Bcast.*$//g'

删除空白行:cat /etc/man.config|grep 'MAN' |sed 's/#.*$//g'|sed '/^$/d'

egrep与grep: egrep=grep -E egrep支持扩展正则表达式,而grep默认只支持基础正则表达式。

举个例子,滤除文件中的空行和以#开头的行。使用grep情况下需要两次通道“grep -v '^$' test.txt|grep -v '^#'”;使用egrep不需要通道,只需要扩展正则的'或',“egrep -v '^$|^#' test.txt

获得一天前的日期:date --date='1 days ago' +%y%m%d

 

 

 

未完,总结中⋯⋯

分享到:
评论

相关推荐

    Linux shell Script

    Linux shell Script, How to write shell script in Linux system.

    利用LINUX SHELL Script实现数据库系统管理.pdf

    "利用LINUX SHELL Script实现数据库系统管理" 在本篇文章中,我们将讨论如何使用LINUX SHELL Script来实现数据库系统管理。数据库是许多应用业务系统的核心设施,因此对数据库的测试、监控和维护非常重要。本文将...

    linux shell script tutorial_v2_r5.pdf

    linux shell script tutorial_v2_r5.pdf

    Linux Shell Scripting Cookbook Second Edition

    详细讲解Linux脚本编写方法,包含大量例子演示编写shell脚本方法

    Linux Shell Scripting Cookbook(3rd) 无水印pdf

    Linux Shell Scripting Cookbook(3rd) 英文无水印pdf 第3版 pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权...

    Linux Shell Scripting Cookbook 3rd.pdf

    linux shell 脚本攻略 学习 shell script 脚本 经典 linux shell scripting cookbook

    Linux Shell Scripting Cookbook.epub

    Proper usage of shell commands can easily solve many complex tasks with a few lines of code, but most linux users don't have the right know-how to use the Linux shell to its full potential. ...

    linux shell script

    linux shell 学习资源,非常好,建议大家看看

    Linux Shell Scripting Cookbook.mobi

    Proper usage of shell commands can easily solve many complex tasks with a few lines of code, but most linux users don't have the right know-how to use the Linux shell to its full potential. ...

    Linux SHell Script

    Linux Shell Script with Bash , it is target for advanced user. it is useful

    Linux Shell Scripting Cookbook.pdf

    Proper usage of shell commands can easily solve many complex tasks with a few lines of code, but most linux users don't have the right know-how to use the Linux shell to its full potential. ...

    LINUX SHELL SCRIPT

    LINUX 脚本编程的文档,本文件全英文的特别好用,请大家来这里下载吧。

    Mastering Linux Shell Scripting

    Shell scripting is a quick method to prototype a complex application or a problem by automating tasks when working on Linux-based systems. Using both simple one-line commands and command sequences ...

    Shell Script教程

    身為 UNIX 系統管理者除了要熟悉 UNIX 指令外,我們最好學會幾種 scripts 語言,例如 shell script 或 perl。學會 script 語言後,我們就可以將日常的系統管理工作寫成一支執行檔,如此一來,在管理系統時就可以更加...

    LinuxShell脚本编程实例.doc

    # menu shell script. samli 2004.4.19 until do echo "List Directory..........1" echo "Change Directory........2" echo "Edit File...............3" echo "Remove File.............4" echo "Exit Menu....

    Mastering Linux Shell Scripting.epub

    Shell scripting is a quick method to prototype a complex application or a problem by automating tasks when working on Linux-based systems. Using both simple one-line commands and command sequences ...

    Mastering Linux Shell Scripting.mobi

    Shell scripting is a quick method to prototype a complex application or a problem by automating tasks when working on Linux-based systems. Using both simple one-line commands and command sequences ...

    LinuxShell脚本编写PPT课件.pptx

    Linux Shell脚本编写PPT课件 本PPT课件主要讲解了Linux Shell脚本编写的基础知识,涵盖了Shell脚本的概念、格式、变量、echo命令、变量引用实例等方面的内容。 一、Shell脚本概念 Linux Shell脚本是多个Linux命令...

Global site tag (gtag.js) - Google Analytics