把以下存成 script 檔 test.sh, 把壓好的 file.tgz 附加在後面 cat file.tgz >> test.sh
exit 0 以上的地方可以再加任意指令
#!/bin/sh
tail +$((`grep -an "^### end of script" $0 | head -1 | cut -d: -f1`+1)) $0 | tar zxf -
exit 0
### end of script ### by pank
把以下存成 script 檔 test.sh, 把壓好的 file.tgz 附加在後面 cat file.tgz >> test.sh
exit 0 以上的地方可以再加任意指令
#!/bin/sh
tail +$((`grep -an "^### end of script" $0 | head -1 | cut -d: -f1`+1)) $0 | tar zxf -
exit 0
### end of script ### by pank
This page contains a single entry by Pank published on February 19, 2004 1:12 PM.
linux fdisk CHS 和 size 大小關係 was the previous entry in this blog.
台語字典 is the next entry in this blog.
Find recent content on the main index or look in the archives to find all content.
Leave a comment