Ver código fonte

Convert grep to array

Bob Mottram 9 anos atrás
pai
commit
1fc24f5e5c
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1
    1
      src/freedombone-freedns

+ 1
- 1
src/freedombone-freedns Ver arquivo

47
 }
47
 }
48
 
48
 
49
 detected_codes=()
49
 detected_codes=()
50
-codelines=$(grep "_CODE=" $CONFIGURATION_FILE | uniq)
50
+codelines=($(grep "_CODE=" $CONFIGURATION_FILE | uniq))
51
 for line in "${codelines[@]}"
51
 for line in "${codelines[@]}"
52
 do
52
 do
53
     code=$(echo "$line" | awk -F '=' '{print $2}')
53
     code=$(echo "$line" | awk -F '=' '{print $2}')