- Embedded System 控制界面
- 登入
- 防止技術洩漏
沒有檔案系統
- AVR Web Server
- uIP (source code,已成為 Contiki 作業系統的一部分)
- GoAhead
- boa
- mini_httpd -- 使用 fork 處理每個連線,有 90% Apache 效能。gargolye_httpd 是 mini_httpds 的改良。
- uhttpd
- thttpd
- lighttpd
- 常跟 apache 比較,可架大網站。
- appweb
- 伺服器端 JavaScript
| BRE | POSIX BRE | ERE | |
|---|---|---|---|
| 基本字元符 | 支援 | 支援 | 支援 |
| 跳脫基本字元符 | 反斜線 | 反斜線 | 反斜線 |
| 擴充字元符 | 一般字元 | 反斜線跳脫 | 支援 |
| 跳脫擴充字元符 | ? | 支援 | 反斜線 |
PCRE (Perl-compatible Regular Expressions)
echo -ne '\x5a'
echo -n 5a | perl -pe 's/([0-9a-fA-F]{2})/chr hex $1/gie'
echo 5a | perl -ne 's/([0-9a-fA-F]{2})/print chr hex $1/gie'
perl -lne 'print pack "H*", $_'
echo -n 5a | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf
echo -n 5a | xxd -r -p
$ a=5a $printf "\x${a}"
參考來源:sed (stream editor) 是一個 stream 編輯軟體,直接對檔案一行一行處理。不像一般編輯軟體將檔案載入 buffer 後進行處理。sed 支援正規表示式及流程控制,可視為一種小型指令檔語言。
用來決定哪些行套用動作,不然每行都套用。有些動作不能有位址;有些可以有一個,指定符合的那些行;有些可以有兩個用「,」隔開,標示行的範圍。位址格式如下:
一系列編輯命令用「;」隔開。
ls -l $filename | awk '{print $5}'awk 'NR==1; END{print}' testing.txt| id++ id-- | post-increment and post-decrement |
| ++id --id | pre-increment and pre-decrement |
| - + | unary minus and plus |
| ! ~ | logical and bitwise negation |
| ** | exponentiation |
| * / % | multiplication, division, remainder |
| + - | addition, subtraction |
| << >> | left and right bitwise shifts |
| <= >= < > | comparison |
| == != | equality and inequality |
| & | bitwise AND |
| ^ | bitwise exclusive OR |
| | | bitwise OR |
| && | logical AND |
| || | logical OR |
| expr?expr:expr | conditional operator |
| = *= /= %= += -= <<= >>= &= ^= |= | assignment |
| expr1 , expr2 | comma |
| [ str1 = str2 ] [ str1 == str2 ] |
字串相等 | POSIX 相容 test 指令要用「=」。 |
| [ str1 != str2 ] | 字串不相等 | |
| [ str1 \> str2 ] | 字串大於 | 「\」是 shell 的跳脫字元,消除「>」「<」輸出入轉向之意。 |
| [ str1 \< str2 ] | 字串小於 | |
| [ -z str ] | 空字串,字串長度為 0 | |
| [ str ] [ -n "str" ] |
非空字串,字串長度大於 0 | 兩者結果有些不一樣,似乎 -n 字串前後要加 " 才會對 |
| [ n1 -eq n2 ] | 相等 |
| [ n1 -ne n2 ] | 不相等 |
| [ n1 -gt n2 ] | 大於 |
| [ n1 -ge n2 ] | 大於等於 |
| [ n1 -lt n2 ] | 小於 |
| [ n1 -le n2 ] | 小於等於 |
| [ -a file ] | 檔案存在 (和 -e 有何不同?) |
| [ -b file ] | 存在為 block 裝置 |
| [ -c file ] | 存在為 character 裝置 |
| [ -d file ] | 存在為目錄 |
| [ -e file ] | 檔名存在 |
| [ -f file ] | 存在為一般檔案 |
| [ -g file ] | 檔案存在且 set-group-id |
| [ -h file ] | 檔案為 symbolic link (和 -S 有何不同?) |
| [ -k file ] | 存在且有設 sticky bit |
| [ -p file ] | 存在為 named pipe (FIFO) |
| [ -r file ] | 存在為可讀 |
| [ -s file ] | 存在為非空檔案 |
| [ -t fd ] | file descriptor fd is open and refers to a terminal |
| [ -u file ] | 存在且 set-user-id |
| [ -w file ] | 存在為可寫 |
| [ -x file ] | 存在為可執行 |
| [ -G file ] | 存在為 effective group id 擁有 |
| [ -L file ] | 存在為 symbolic link |
| [ -N file ] | 存在,且上次讀取後有更改 |
| [ -O file ] | 存在為擁有者 |
| [ -S file ] | 存在為 socket |
| [ file1 -ef file2 ] | 兩者是否為同一個檔案 (同一個 inode) |
| [ file1 -nt file2 ] | 較新,或 file1 存在 file2 不存在 |
| [ file1 -ot file2 ] | 較舊,或 file1 不存在 file2 存在 |
require Function__index Metamethod__newindex Metamethod| ATtiny | pin | IO | insts | registers | Flash | SRAM | EEPROM | Peripheral | Hardware |
|---|---|---|---|---|---|---|---|---|---|
| ATtiny4/9 | 6 | 4 | 54 | 16x8 | 512/1024 | 32 | 0 | PWM | http://hackaday.com/tag/attiny9/ |
| ATtiny5/10 | PWM, ADC | http://hackaday.com/tag/attiny10/ | |||||||
| ATtiny13 ATinty13A | 8 | 6 | 120 | 32x8 | 1K | 64 | 64 | PWM, ADC | http://hackaday.com/tag/attiny13/ |
| ATtiny25 ATtiny45 ATtiny85 | 2/4/8K | 128/256/512 | PWM, ADC, USI | i2c-tiny-usb Digispark | |||||
| ATtiny24 ATtiny44 ATtiny84 | 14 | 12 | PWM, ADC, USI, Temperature | http://hackaday.com/tag/attiny24/ http://hackaday.com/tag/attiny44/ http://hackaday.com/tag/attiny84/ | |||||
| ATtiny20 | 112 | 16x8 | 2K | 128 | 0 | PWM, ADC, SPI, TWI | PWM | ||
| ATtiny2313 | 20 | 18 | 120 | 32x8 | 2K | 128 | 128 | PWM, ADC, USI, USART | USBtinyISP |
所有 SIP 訊息 都要有 Via,縮寫 v。一開始的 UAC 和後續途經的每個 proxy 都會疊加一個 Via 放傳送的位址,依序作為回應的路徑。 格式 sent-protocol sent-by [ ;branch= branch ][ ; 參數 ...] s...