2010-1-20
How to input enter in vim substitution command: %s/,/ctrl+v ctrl+enter/g
2010-1-25
Got such error 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 above errors first!
Resolved by first ‘cvs update -A’, then commit.
2010-1-26
How to convert 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 the result into file [hex]:
while read line; do echo "obase=16;$line" | bc | tr [:upper:] [:lower:] >> hex; done < dec
For large file, the above solution is rather slow (due to lots of pipes). A faster one is:
echo ‘obase=16’ > foo1; cat foo1 dec > foo2; echo ‘quit’ >> foo2
bc foo2 | tr [:upper:] [:lower:] > dec
rm foo1 foo2