📄 gzexe.in
字号:
:#!/bin/sh# Compressor for Unix executables.# Use this only for binaries that you do not use frequently.# The compressed version is a shell script which decompresses itself# after skipping 18 lines of shell commands.if test $# = 0; then echo compress executables. original file foo is renamed to foo~ echo usage: `basename $0` files... exit 1fires=0for i do if test ! -f $i ; then echo `basename $0`: $i not found res=1 continue fi# Try invoking the compressed executable with the original name: sed "s,foo,$i," > g$$ <<'EOF'#!/bin/shif tail +18 $0 | gzip -cd > /tmp/gztmp$$; then chmod 755 /tmp/gztmp$$ if ln /tmp/gztmp$$ /tmp/foo 2>/dev/null; then /tmp/foo $* res=$? /bin/rm -f /tmp/gztmp$$ /tmp/foo else /tmp/gztmp$$ $* res=$? /bin/rm -f /tmp/gztmp$$ fielse echo Cannot decompress $0 exit 1fiexit $resEOF if gzip -cv9 $i >> g$$; then /bin/rm -f $i~ mv $i $i~ mv g$$ $i chmod 755 $i else /bin/rm -f g$$ echo `basename $0`: compression not possible for $i, file unchanged. res=1 fidoneexit $res
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -