OSDN Git Service

[fix] : Use line feed code to set IFS
authorhayao <hayao@fascode.net>
Wed, 5 May 2021 04:38:59 +0000 (13:38 +0900)
committerhayao <hayao@fascode.net>
Wed, 5 May 2021 04:38:59 +0000 (13:38 +0900)
alterlinux-live-info/alterlinux-live-info

index 0136a23..35cde41 100755 (executable)
@@ -80,8 +80,7 @@ else
     # 値を取得する
     values=()
     PREV_IFS="${IFS}"
-    IFS="
-"
+    IFS=$'\n'
     values=($(cat "${infofile}" | cut -d ':' -f 2- | sed "s|^ ||g" | grep -v ^$))
     line_number=$(( "$(cat "${infofile}" 2> /dev/null | wc -l)" - 1 ))
     IFS="${PREV_IFS}"