%, %%, #, ## Matching Rule
file_txt="example.a.b"
# %notation cut from right to left of string, including .*
ngreedy=${file_txt%.*} # ngreedy = "example.a"
greedy=${file_txt%%.*} # greedy = "example"
# #notation cut from left to right of string, including .*
ngreedy=${file_txt#*.} # ngreedy = "a.b"
greedy=${file_txt##*.} # greedy = "b"
expect shell
expect shell is a shell in Linux, like bash
spawn: an encapsulation of ssh command, expect: listen output, send: input, interact: hold
# Example
set timeout 30 # in seconds
spawn ssh host
expect {"password:" {send "$PASSWORD\n"; exp_continue} } # exp_continue start from expect
interact
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。