shc,編譯 Shell Script
shc, a generic script compiler
可以把 Shell Script 原始檔編譯,以免原始碼外洩。
先從 http://www.datsi.fi.upm.es/~frosal/ 下載 shc-3.8.9.tgz。
# tar -zxvf shc-3.8.9.tgz --解壓縮
# cd shc-3.8.9
# make
make: *** No rule to make target `shc.c', needed by `shc'. Stop. --失敗,提示沒有 shc.c
# less makefile --查看 makefile 描述檔
INSTALL_PATH = /usr/local --安裝目錄,最後它會安裝在 /usr/local/bin/
shc: shc.c
$(CC) $(CFLAGS) $@.c -o $@ --需要 shc.c
# cp shc-3.8.9 .c shc.c --複製檔案
# make
# make install
安裝成功後,撰寫一個測試 Shell Script
# vi test.sh
只有兩行內容,顯示 Hello,the world
#!/bin/sh
echo "Hello, the world"
# chmod 700 test.sh
# shc -v -f test.sh
產生兩個檔案 test.sh.x.c 與 test.sh.x
# ./test.sh.x
Hello, the world
測試成功
-
Windows7 / Windows8 kill process Linux下要刪除某個程序通常會使用 ps 配合 kill 來刪除程序。 例如:ps -ef |grep [PROCESS NAME] kill -9 [PID] 在Windows下,通常是...
-
利用Win 10的工作排程器來設定每日自動執行的批次檔,單獨執行批次檔沒問題,但是放在排程上就是無法執行。 後來試了幾種網路上提供的方式,其注意的事項如下: 1、在「安全性選項」選擇「只有使用者登入時才執行」並取消「以最高權限執行」。 2、在「設定」中選擇「Win...
-
其實預設都會幫我們安裝pip這個管理套件,但是我在安裝完python 3.7後卻無法使用pip來安裝套件。 查詢是否已經有安裝pip: C:\> python -m pip --version pip 20.0.2 from C:\Python37\lib\si...