problem 56 awk
**例項
awk '# factorial: return factorial of user-supplied number
begin
# check that user enters a number
$1 ~ /^[0-9]+$/
# if not a number, prompt again.
' -
awk '# lookup -- reads local glossary file and prompts user for query
#0
begin
#1 read local file named glossary
filename == "glossary"
#2 scan for command to exit program
$0 ~ /^(quit|[qq]|exit|[xx])$/
#3 process any non-empty line
$0 != "" else
print $0 " not found"
}
#4 prompt user again for another term
' glossary -
problem 57檢測c庫中是否支援某個函式的指令碼?
ans:
#!/bin/sh
# needed for systems without gettext
gcc -xc -o /dev/null - > /dev/null 2>&1 << eof
#include
int main()
eof
if [ ! "$?" -eq "0"]; then
echo -dkbuild_no_nls;
fi
選項x指定特定語言, 這裡指定的是c語言。
hadoop hdfs 問題集錦 面試問題集錦
hadoop hdfs問題集錦 一 hadoop為什麼不適合處理大量的小檔案,怎麼解決?原因 1 檔案的元資料 包括檔案被分成了哪些blocks,每個block儲存在哪些伺服器的哪個block塊上 都是儲存在namenode上的記憶體,會對namenode的記憶體造成壓力 2 檔案過多會造成檔案的定...
403問題集錦
如果你是訪問乙個網頁出現這個問題 說明這個網頁是一般人是關閉的 禁止訪問的 你就不要看了 錯誤 403.1 403.1 錯誤是由於 執行 訪問被禁止而造成的,若試圖從目錄中執行 cgi isapi 或其他可執行程式,但該目錄不允許執行程式時便會出現此種錯誤。錯誤 403.2 403.2 錯誤是由於 ...
Matlab問題集錦
茲將以後遇到的與matlab相關的小問題,集中到此博文中。1 在malab中如何顯示特殊字元?試想,如果你想將pi的希臘字母,該怎麼辦呢?如果想要輸入上下標或希臘字母,又該怎麼辦呢?輸下標 輸上標 輸latex公式 text interpreter latex string int 0 x int ...