2023年3月29日 星期三

Bash built-in case modification

BASH 有內建大小寫轉換功能,執行效率會比使用 tr, sed, awk 好

$ A=ABCdef

# To upper case
$ echo ${A^^}
ABCDEF

# To lower case
$ echo ${A,,}
abcdef

沒有留言:

New SSH client to old SSH server

從新版 SSH 8.x 連到舊版 6.x SSH server 若出現 Unable to negotiate with x.x.x.x port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss ...