ソースを参照

Convert grep to array

Bob Mottram 8 年 前
コミット
1fc24f5e5c
共有1 個のファイルを変更した1 個の追加1 個の削除を含む
  1. 1
    1
      src/freedombone-freedns

+ 1
- 1
src/freedombone-freedns ファイルの表示

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