[root@udiskos ~]# wget http://www.datsi.fi.upm.es/~frosal/sources/shc-3.8.9.tgz
[root@udiskos ~]# ls
shc-3.8.9.tgz
[root@udiskos ~]# tar -zvxf shc-3.8.9.tgz
[root@udiskos ~]# ls
shc-3.8.9 shc-3.8.9.tgz
[root@udiskos ~]# mkdir -p /usr/local/man/man1
[root@udiskos ~]# cd shc-3.8.9
[root@udiskos shc-3.8.9]# ls
CHANGES Copying makefile match pru.sh shc.1 shc-3.8.9.c shc.html shc.README test.bash test.csh test.ksh
[root@udiskos shc-3.8.9]# make test
make: *** 没有规则可以创建“shc”需要的目标“shc.c”。 停止。
[root@udiskos shc-3.8.9]# rpm -q gcc
gcc-4.4.7-3.el6.x86_64
[root@udiskos shc-3.8.9]# cp -av shc-3.8.9.c shc.c
"shc-3.8.9.c" -> "shc.c"
[root@udiskos shc-3.8.9]# ls
CHANGES Copying makefile match pru.sh shc.1 shc-3.8.9.c shc.c shc.html shc.README test.bash test.csh test.ksh
[root@udiskos shc-3.8.9]# make
*** you want to probe shc with a test script?
*** Please try... make test
[root@udiskos shc-3.8.9]# make install
*** Installing shc and shc.1 on /usr/local
*** you want to continue? y
install -c -s shc /usr/local/bin/
install -c -m 644 shc.1 /usr/local/man/man1/
[root@udiskos shc-3.8.9]# cp -av shc /bin/
"shc" -> "/bin/shc"
[root@udiskos shc-3.8.9]# chmod +x /bin/shc
[root@udiskos shc-3.8.9]# shc
shc parse(-f): No source file specified
shc Usage: shc [-e date] [-m addr] [-i iopt] [-x cmnd] [-l lopt] [-rvDTCAh] -f script
[root@udiskos shc-3.8.9]# cd
[root@udiskos ~]# shc --help
shc: invalid option -- '-'
shc parse: Unknown option
shc Version 3.8.9, Generic Script Compiler
shc Copyright (c) 1994-2012 Francisco Rosales <frosal@fi.upm.es>
shc Usage: shc [-e date] [-m addr] [-i iopt] [-x cmnd] [-l lopt] [-rvDTCAh] -f script
-e %s Expiration date in dd/mm/yyyy format [none]
-m %s Message to display upon expiration ["Please contact your provider"]
-f %s File name of the script to compile
-i %s Inline option for the shell interpreter i.e: -e
-x %s eXec command, as a printf format i.e: exec('%s',@ARGV);
-l %s Last shell option i.e: --
-r Relax security. Make a redistributable binary
-v Verbose compilation
-D Switch ON debug exec calls [OFF]
-T Allow binary to be traceable [no]
-C Display license and exit
-A Display abstract and exit
-h Display help and exit
Environment variables used:
Name Default Usage
CC cc C compiler command
CFLAGS <none> C compiler flags
Please consult the shc(1) man page.
[root@udiskos ~]#
*******************************************************************************************