-
Shell脚本去除字符串最后的斜杠
dir=/root/ if [[ $dir =~ /$ ]];then dir=${dir:0:-1} fi echo $dir dir=/root if [[ $dir =~ /$ ]];then dir=${dir:0:-1} fi echo $dir 这样输出的结果均为/root 极客公园 , 版权所有丨如未注明 , 均为原 … -
-
-
-
-
-
-
-
-
-
-
-
-
Switching between zsh Themes with a Shell Command
This post explains how to set up a shell script for easily switching between command prompt themes for teaching and working. -