上一页 1 ··· 5 6 7 8 9 10 下一页

2014年2月13日

摘要: vim是vi的加强版。进入vim或编辑完毕按esc后,输入/可帮助查找字符串,例如/main帮助查找main函数,找到的main高亮显示。取消高量显示的两个办法:1)按esc键,输入:nohl2)按esc键,查找不存在的字符串,例如/xxxx转自:http://idata.blog.51cto.com/4581576/815075 阅读全文
posted @ 2014-02-13 09:13 菲一打 阅读(562) 评论(0) 推荐(1)
 

2014年2月12日

摘要: http://www.cnblogs.com/jiqingwu/archive/2012/06/14/vim_notes.html曾经使用了两年多的Vim,手册也翻过一遍。虽然现在不怎么用vim了,曾经的笔记还是贴出来,与喜欢vim的朋友分享。索引1. 关于Vim1.1 Vim的几种模式2. 启动Vim3. 文档操作4. 光标的移动4.1 基本移动4.2 翻屏4.3 标记5. 插入文本5.1 基本插入5.2 改写插入6. 剪切复制和寄存器6.1 剪切和复制、粘贴6.2 文本对象6.3 寄存器7. 查找与替换7.1 查找7.2 替换7.3 正则表达式8. 排版8.1 基本排版8.2 拼写检查8. 阅读全文
posted @ 2014-02-12 14:09 菲一打 阅读(257) 评论(0) 推荐(0)
 
摘要: centos安装vim7.4系统版本centos6.4;root权限su - root 卸载$ rpm -qa | grep vim$ yum remove vim vim-enhanced vim-common vim-minimal 下载、解压$ wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2 $ wget ftp://ftp.vim.org/pub/vim/extra/vim-7.2-extra.tar.gz$ wget ftp://ftp.vim.org/pub/vim/extra/vim-7.2-lang.tar.gz$ $ t 阅读全文
posted @ 2014-02-12 10:36 菲一打 阅读(7927) 评论(1) 推荐(1)
 

2014年2月11日

摘要: #!/bin/awk -f awk脚本开头使用这个命令,赋予这个文本文件以执行的权限。这样做之后,你就可以在命令行中用类似于下面这样的方式调用并执行这段awk程序了。BEGIN和END的大括号必须紧其后,如果换行会出错:awk: cmd. line:14: warning: END blocks must have an action part执行awk脚本chmod u+x awk脚本文件名awk -f awk脚本文件名 awk的输入文件 阅读全文
posted @ 2014-02-11 23:14 菲一打 阅读(285) 评论(0) 推荐(0)
 
摘要: http://luy.li/data/awk.html 阅读全文
posted @ 2014-02-11 23:05 菲一打 阅读(126) 评论(0) 推荐(0)
 

2014年1月27日

摘要: $ date +"FORMAT"now=$(date +"%Y-%m-%d-%S")filename="my_program.$now.log"# example filename: my_program.2012-01-23-47.lognow=$(date +"%Y.%m.%d.%S.%N")filename="my_program.$now.log"# example filename: my_program.2013.01.23.44.364617000.lognow=$(date +& 阅读全文
posted @ 2014-01-27 21:46 菲一打 阅读(202) 评论(0) 推荐(0)
 
摘要: ip route show | grep 'default' | awk '{print $3}'#vim getgw.sh#!/bin/shdefault_gateway_ip=`ip route show | grep 'default' | awk '{print $3}'`echo $default_gateway_ip 阅读全文
posted @ 2014-01-27 21:15 菲一打 阅读(365) 评论(0) 推荐(0)
 
摘要: $ curl ifconfig.me$ curl icanhazip.com$ curl ident.me$ curl ipecho.net/plain$ curl whatismyip.akamai.com$ curl tnx.nl/ip$ curl myip.dnsomatic.com$ curl ip.appspot.com$ curl -s checkip.dyndns.org | sed 's/.*IP Address: \([0-9\.]*\).*/\1/g'转自:http://xmodulo.com/2013/04/how-to-find-the-public-i 阅读全文
posted @ 2014-01-27 21:10 菲一打 阅读(13407) 评论(0) 推荐(1)
 

2014年1月22日

摘要: Linux have amazed every tech guy and make them curious to hands on Linux. Many of us not feel Linux easy to use but almost everyone agrees that it is a powerful l OS.I am always interested in learning more on Linux. I found Linux is not as difficult as many people think and they feel it is little di 阅读全文
posted @ 2014-01-22 12:02 菲一打 阅读(336) 评论(0) 推荐(0)
 

2014年1月16日

摘要: shell的逻辑运算符 涉及有以下几种类型,因此只要适当选择,可以解决我们很多复杂的判断,达到事半功倍效果。一、逻辑运算符逻辑卷标 表示意思 1.关于档案与目录的侦测逻辑卷标!-f常用!侦测‘档案’是否存在 eg: if [ -f filename ]-d常用!侦测‘目录’是否存在-b侦测是否为一个‘ block 档案’-c侦测是否为一个‘ character 档案’-S侦测是否为一个‘ socket 标签档案’-L侦测是否为一个‘ symbolic link 的档案’-e侦测‘某个东西’是否存在!2.关于程序的逻辑卷标!-G侦测是否由 GID 所执行的程序所拥有-O侦测是否由 UID 所执行 阅读全文
posted @ 2014-01-16 16:45 菲一打 阅读(212) 评论(0) 推荐(0)
 
上一页 1 ··· 5 6 7 8 9 10 下一页