?? undeb
字號:
#!/bin/sh## This should work with the GNU version of tar and gzip!# This should work with the bash or ash shell!# Requires the programs (ar, tar, gzip, and the pager more or less).#usage() {echo "Usage: undeb -c package.deb <Print control file info>"echo " undeb -l package.deb <List contents of deb package>"echo " undeb -x package.deb /foo/boo <Extract deb package to this directory,"echo " put . for current directory>" exit}deb=$2 exist() {if [ "$deb" = "" ]; thenusageelif [ ! -s "$deb" ]; thenecho "Can't find $deb!"exitfi}if [ "$1" = "" ]; thenusageelif [ "$1" = "-l" ]; thenexisttype more >/dev/null 2>&1 && pager=moretype less >/dev/null 2>&1 && pager=less[ "$pager" = "" ] && echo "No pager found!" && exit(ar -p $deb control.tar.gz | tar -xzO *control ; echo -e "\nPress enter to scroll, q to Quit!\n" ; ar -p $deb data.tar.gz | tar -tzv) | $pager exitelif [ "$1" = "-c" ]; thenexistar -p $deb control.tar.gz | tar -xzO *control exitelif [ "$1" = "-x" ]; thenexistif [ "$3" = "" ]; thenusageelif [ ! -d "$3" ]; thenecho "No such directory $3!"exitfiar -p $deb data.tar.gz | tar -xzvpf - -C $3 || exit echoecho "Extracted $deb to $3!"exitelseusagefi
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -