📄 syncedb
字号:
#!/bin/shPATH=/u/up/tim/bin:$PATHverbose=0if [ $# -lt 2 -o $# -gt 3 ]; then echo usage: $0 [-v] rootdir edbdbmfile exit 1fiif [ $1 = "-v" ]; then verbose=1 shiftfiif [ $# -ne 2 ]; then echo usage: $0 [-v] rootdir edbdbmfile exit 1fi# lock the entryDN="`file2dn $1 \"$2\"`"MANAGER="c=us@o=university of michigan@cn=manager"PASSWORD=stinkbugif [ $verbose = 1 ]; then echo bind "$MANAGER" -password HIDDENfibind "$MANAGER" -password "$PASSWORD"if [ $verbose = 1 ]; then echo dsacontrol -lock "$DN"fidsacontrol -lock "$DN"# cat the dbm fileif [ $verbose = 1 ]; then echo "edbcat $2 >/tmp/edb.$$"fiedbcat "$2" >/tmp/edb.$$catstat=$?# unlock the entrydsacontrol -unlock "$DN"unbind# if that went ok, move the text edb file to EDBif [ $catstat = 0 ]; then if [ $verbose = 1 ]; then echo /bin/cp /tmp/edb.$$ "$2" fi /bin/cp /tmp/edb.$$ "$2"fiif [ $verbose = 1 ]; then echo "/bin/rm -f /tmp/edb.$$"fi/bin/rm -f /tmp/edb.$$
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -