迷途工程師
2020年12月11日 星期五
常用到的 git command
›
1. =====透過git server 下載Source Code ====== # git clone git@github.com:zlargon/git-test. git 2. ====== 上傳新增的檔案(上傳之後還要commit與push) ======= # ...
2020年11月17日 星期二
shell script 帶參數, 印出usage使用方式的程式框架
›
撰寫Script常常會帶入參數,又需要當使用者沒有帶入參數時,要印出使用方法. 下面的程式框架是要求使用者帶入兩個參數,如果使用錯誤,則印出usage()告知使用者. 此檔案 test.sh實際做法如下: #!/bin/sh function usage() { ech...
2020年10月30日 星期五
shell script 大寫轉小寫,小寫轉大寫
›
#大寫轉小寫 ============= upper_to_lower.sh ================= value="$(echo $1 | tr '[:upper:]' '[:lower:]')" echo $va...
2020年10月27日 星期二
Source Insight 無法加入 *.cc檔案
›
遵照下面操作步驟,可以把*.cc檔案加入到目前Project Options -> Document Options,然後在視窗上方 Document Type的下拉選項,選擇C++ Source File,右邊的File filter欄位,請加入 *.cc ,然後就可以...
shell script if 判斷多個條件
›
if判斷多個條件的寫法如下: (sh) ================= #!/bin/sh A=10 B=15 if [ $A = "10" ] && [ $B = "15" ]; then echo ...
2020年9月22日 星期二
Shell script使用for來parser以空白做間格的字串
›
Shell script 使用 for 來 parser 以空白做間格的字串 (Bash) #!/bin/bash package="111 222 333 555 666" for p in ${package[@]}; do echo $p ...
2020年9月21日 星期一
cp: will not overwrite just-created
›
今天 跑Script的途中,遇到一個問題 cp: will not overwrite just-created ,而導致script停了下來 其發生主要的原因是,當我們 cp 或是 mv 兩個不同地方,卻是同樣的檔案名稱到同一個目錄底下 系統為了防止第二個文件去...
‹
›
首頁
查看網路版