Просмотр исходного кода

$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd '[:digit:]')
doesn't work on some version of bash unless [:digit:] is enclosed in qoutes

Ilija Matoski 11 лет назад
Родитель
Сommit
8a714b00cb
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      functions/fn_details_distro

+ 1 - 1
functions/fn_details_distro

@@ -29,7 +29,7 @@ glibcv=$(ldd --version |grep ldd|awk '{print $NF}')
 # e.g: tmux 1.6
 if [ -z "$(command -v tmux)" ]; then
 	tmuxv="\e[0;31mNOT INSTALLED!\e[0m"
-elif [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd [:digit:])" -lt "16" ]; then
+elif [ "$(tmux -V|sed "s/tmux //"|sed -n '1 p'|tr -cd '[:digit:]')" -lt "16" ]; then
 	tmuxv="$(tmux -V) (>= 1.6 required for console log)"
 else
 	tmuxv=$(tmux -V)