[20180413]bash 位置参数.txt
[20180413]bash 位置参数.txt --//上午在测试hugepage时,链接http://blog.itpub.net/267265/viewspace-2152888/ --//脚本写的太不灵活,不应该每次测试修改脚本,应该采用传位置参数. --//修改如下: $ cat b.sh #!/bin/bash grep -i page /proc/meminf...
[20180131]bash变量替换与截取.txt
[20180131]bash变量替换与截取.txt --//bash编程经常用到变量替换与截取,经常记不住,做一些例子说明: $ a=1a1b1c1d $ echo $a 1a1b1c1d $ echo ${a##*1} d $ echo ${a#*1} a1b1c1d --// ## 最长匹配替换 # 最短匹配替换 $ echo ${a%1*} 1a1b1...
[20180129]bash显示path环境变量.txt
[20180129]bash显示path环境变量.txt --//PATH环境变量很长,我以前写过一个链接如下: http://blog.itpub.net/267265/viewspace-1192302/ echo $PATH | tr ":" "\n" function path(){ old=$IFS IFS=: ...
[20171205]bash for例子错误.txt
[20171205]bash for例子错误.txt --//今天写bash for循环,遇到问题.通过例子说明: $ cat tt1.sh #! /bin/bash for i in { 1 .. 5 } do echo $i done --//本想输出1,2,3,4,5的.而实际上执行输出是: $ . tt1.sh { 1 .. ...
[20171125]bash for例子.txt
[20171125]bash for例子.txt #!/bin/bash for i in {1..10} do echo $i done --//学习!!特别是for后面的技巧.我以前喜欢使用seq,感觉上面要好一些,毕竟不使用命令seq. #!/bin/bash for i in $(seq 10) do echo $i done
[20151010]bash for循环.txt
[20151010]bash for循环.txt --同事要写一个shell要使用for循环。遇到一些问题做一些记录。 --我一般会使用seq命令生成序列.我记得以前写过脚本: http://blog.itpub.net/267265/viewspace-758573/ --例子: #! /bin/bash for i in $(seq 10) do ech...
[20130225]bash shell 的提示符.txt
[20130225]bash shell 的提示符.txthttp://www.thegeekstuff.com/2008/09/bash-shell-take-control-of-ps1-ps2-ps3-ps4-and-prompt_command/http://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-y....
[20120106]使用bash shell显示隐含参数.txt
我个人喜欢使用putty打开两个窗口,一个执行sql语句,另外一个查看目录user_dump_dest下的trc文件。如果要查询隐含参数,往往要切换sys用户,执行一个脚本:$ cat hide.sqlcol name format a36col description format a66col session_value format a22col default_value format ....
本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。
开发与运维
集结各类场景实战经验,助你开发运维畅行无忧
+关注