16/11/2017 shell學習筆記
檢查一組代碼從執行開始到執行完畢的時間。
#!/bin/bash start=$(date +%s) commands; statements; end=$(date +%s) difference=$(( end - start )) echo Time taken to execute commands is $difference seconds.
16/11/2017 shell學習筆記
相關推薦
16/11/2017 shell學習筆記
學習筆記 shell檢查一組代碼從執行開始到執行完畢的時間。#!/bin/bash start=$(date +%s) commands; statements; end=$(date +%s) difference=$(( end - start )) echo Time taken to execute
2017.11.29 python學習筆記
多分支語句 If elif elif else 異常處理 try except 語句 try: <body> except <ErrorType1>: <handler1> excep
shell學習筆記(一)
image scanner src 判斷 長度 提示信息 $1 描述 id屬性 1、第一行必須以#!/bin/bash #!表示腳本使用後面的解釋器解釋執行 2、echo 打印輸出 例如 echo "hello world" > aa.txt
shell學習筆記
nsf 學習筆記 符號 $1 用戶登錄 sci who aid int 已登錄用戶的個數: who | wc -l 查看系統有哪些用戶登錄 : who 新建一個文件/bin/ct11,在文件中輸入一條命令,chmod為該文件設置執行權限 # cat > /bin/
shell學習筆記1 【linux shell 編程從初學到精通第2版】
$1 註釋 文件名 man 輸出 當前 進制數 2.4 it is 已登錄用戶的個數: who | wc -l 查看系統有哪些用戶登錄 : who 新建一個文件/bin/ct11,在文件中輸入一條命令,chmod為該文件設置執行權限 # cat > /bin/ct
bash shell學習筆記(一)—— 常用命令
排序 class $@ 幫助 row 自動 from quic 方式 一、基本的bash shell命令 1、默認bash shell 提示符是美元符號($); 2、bash手冊 使用man命令來訪問存儲在Linux系統上的手冊頁面,如: bogon:~ Mac$
shell學習筆記(2)
shell 基礎 雜記一、標準輸入命令read與實踐 1、read基礎用法 [root@master4 day3]# read -p "Pls input tow num:" a1 a2 Pls input tow num:1 2 2、小腳本示例 [root@master4 day3]# vim read.s
shell學習筆記(3)
shell 基礎 雜記if 一、if基礎 1、單分支 1.1 語法 if語句語法 單分支結構語法: if [條件]; then 指令 fi 或 if [條件] then 指令 fi 1.2 例子 [roo
shell學習筆記(4)
shell 基礎 筆記 雜記一、 1、利用系統函數模擬實現系統腳本啟動特殊顏色效果 1.1 查看系統函數庫 [root@master4 ~]# ll /etc/init.d/functions -rw-r--r--. 1 root root 13948 Sep 16 2015 /etc/init.d/f
Power Shell 學習筆記
height exe ros 學習筆記 microsoft font 直接 img 控制臺 Powershell 是運行在windows機器上實現系統和應用程序管理自動化的命令行腳本環境。 桌面右擊任務欄開始圖標,打開控制臺對話窗: Windows PowerShell
Shell學習筆記——加密命令
span md5 find 解密 base64 args class encrypted get md5sum / sha1sum 都是單向散列算法,無法逆推出原始數據,通常用於驗證數據完整性,或為數據生成唯一密鑰 生成校驗 md5sum filename &
Python-- scrapy-shell學習筆記
目錄 scrapy-shell 1.啟動 2.response 3.selector 4.練習 (自己做的小練習,獲取招聘網站的資訊) scrapy-shell 官方文件:https://scrapy-chs.readthedocs.io/zh_
11月03學習筆記
今天學到了什麼? 標籤分為一般標籤和組合標籤 一般標籤例如:<b></b> 組合標籤例如:<ol> &nb
2018/11/21 MFC學習筆記 訊息處理
來自鍵盤的訊息 當用戶在鍵盤上按下某個鍵的時候,會產生WM_KEYDOWN的訊息,釋放按鍵的時候會產生WM_KEYUP的訊息,所以這兩個訊息是成對出現的。而WM_CHAR訊息是在使用者輸入有效的ASCII碼的時候才會發生。 在前兩個訊息中,伴隨訊息傳遞的是按鍵的虛擬鍵碼,可以處理如
2018/11/7 MFC 學習筆記
為什麼解構函式要宣告成virtual呢? 因為,如果delete一個基類的指標時, 如果它指向的是一個子類的物件,那麼解構函式不為虛就會導致無法呼叫子類解構函式,從而導致資源洩露。 當然,另一種做法是將基類解構函式設為protected. 舉例: #i
2018/11/1 C++ 學習筆記
2018/11/1 學習筆記 迴圈語句 C++迴圈語句中,for 語句使用頻率最高,while 語句其次,do 語句很少用。提高迴圈體效率的基本辦法是降低迴圈體的複雜性。 在多重迴圈中,如果有可能,應當將最長的迴圈放在最內層,最短的 迴圈放在最外層,以
11.26 CSS學習筆記
CSS,全稱“Cascading Style Sheets”,用於設定HTML標籤的樣式,美化我們的網頁。 (1)“內嵌樣式”:寫在style標籤對裡面 (2)“行內樣式”:直接寫在標籤行上面。 (3)“外鏈樣式”:單獨寫一個css檔案,通過link標籤引入。 (4)“匯入式”:單獨寫一個c
2018-11-21前端學習筆記
一、 複習前一天學習過的標籤。(注意全域性標籤和區域性標籤的區別) 二、 HTML文字標籤(hn span p ) 1、響應式程式碼。可以識別網頁在不同裝置上顯示。1、H1-h6具有和p標籤一樣的特徵,佔滿整行。多個span標籤可以同處一行,而p只能獨佔一行。 注意:p標籤上下都有一個空行,
shell學習筆記之 find/xargs
一:知識背景 1.這兩個命令就是用來匹配出你在整個檔案系統中需要的目錄或者檔案,必須在root使用者下執行。 2.多數sh會採用find和xargs清理過期的日誌,這個最合適不過了 二:命令詳解 語法: find filepath -option 【-print -exec -o
C++11新特性學習筆記—使用花括號就地初始化
這個特性是真正極好的!非常好用且方便!降低工作量! 如果一個類有很多成員變數A,B,C,D...,而且有很多不同版本的建構函式c1,c2,c3....,每個不同的建構函式可能會選擇不同的成員