瀏覽代碼

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}')