原创 sed在tcl中的使用

sed -i s/'hello linux'/'hello fedora'/g /root/textfile 在tcl中的使用方法如下: exec sed -i {s/hello linux/hello fedora/g} /root/t

原创 global variable and local variable

awk 'function foo(abc,   var){var=99print "in the function: abc is " abc " and var is " var}BEGIN{var=33print "before f

原创 merge multi-line

Code:   sed -e :a -e N -e 's//n/ /' -e ta yourfile.txt >newfile.txt   :a # label 'a' to jump back to later on N # Appen

原创 Tcl中binary format 和binary scan命令分析

http://blog.ednchina.com/t_liber/200785/message.aspx

原创 sed中的正則表達式

http://topic.csdn.net/u/20100114/18/f6a22d18-7aa1-439b-a0b7-11cbd41d76e9.html csdn CSDN社區-Linux/Unix社區-系統維護與使用區   測試文件

原创 find用法

由於f i n d具有強大的功能,所以它的選項也很多,其中大部分選項都值得我們花時間來了解一下。即使系統中含有網絡文件系統( N F S ),f i n d命令在該文件系統中同樣有效,只你具有相應的權限。 在運行一個非常消耗資源的f i

原创 format

set value 120puts [format %c $value]set fmt1 "Today, %d shares in %s were bought at $%.2f each"puts [format $fmt1 123 "

原创 grep用於tcl

if { [string equal [exec grep -o {hello} /root/file] "hello"] } {   puts "Yay, it worked!"} 此例的grep用的option -o是隻顯示一行中匹配

原创 vim的設定

:set cursorline    高顯當前行 :set cursorcolumn 高顯當前列 :set cursorline cursorcolumn 高顯當前行,列