Przeglądaj źródła

fix for debian/ubuntu

Serghey Rodin 13 lat temu
rodzic
commit
e4da112048
1 zmienionych plików z 2 dodań i 2 usunięć
  1. 2 2
      bin/v-list-sys-shells

+ 2 - 2
bin/v-list-sys-shells

@@ -17,7 +17,7 @@ source $VESTA/func/main.sh
 
 
 # Json function
 # Json function
 json_list_sh() {
 json_list_sh() {
-    shells=$(cat /etc/shells)
+    shells=$(grep -v '#' /etc/shells)
     sh_counter=$(echo "$shells" | wc -l)
     sh_counter=$(echo "$shells" | wc -l)
     i=1
     i=1
     echo '['
     echo '['
@@ -35,7 +35,7 @@ json_list_sh() {
 
 
 # Shell function
 # Shell function
 shell_list_sh() {
 shell_list_sh() {
-    shells=$(cat /etc/shells)
+    shells=$(grep -v '#' /etc/shells)
     if [ -z "$nohead" ]; then
     if [ -z "$nohead" ]; then
         echo "SHELLS"
         echo "SHELLS"
         echo "----------"
         echo "----------"