浏览代码

Convert grep to array

Bob Mottram 8 年前
父节点
当前提交
1fc24f5e5c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      src/freedombone-freedns

+ 1
- 1
src/freedombone-freedns 查看文件

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