技术日志_5 some notes

来源:互联网 发布:notepad 排版json 编辑:程序博客网 时间:2024/05/18 15:28

2010-1-20

How toinput enter in vim substitution command: %s/,/ctrl+vctrl+enter/g

2010-1-25

Got sucherror when commit with ‘cvs commit global.conf.titan.test’:

cvs server: sticky tag `1.13' for file`global.conf.titan.test' is not a branch

cvs [server aborted]: correct aboveerrors first!

Resolvedby first ‘cvs update -A’, then commit.

 

2010-1-26

How toconvert from decimal to hex using a single command in linux/Unix? Simple!Suppose we have a file [dec], each line is a decimal string and we store theresult into file [hex]:

whileread line; do echo "obase=16;$line" | bc | tr [:upper:] [:lower:]>> hex; done < dec

Forlarge file, the above solution is rather slow (due to lots of pipes). A fasterone is:

echo ‘obase=16’ > foo1; cat foo1 dec > foo2; echo ‘quit’>> foo2

bc foo2 | tr [:upper:] [:lower:] > dec

rm foo1 foo2

 

 

原创粉丝点击