• R/O
  • HTTP
  • SSH
  • HTTPS

fascode-live-tools: Commit

GitHubのミラーです
https://github.com/FascodeNet/fascode-live-tools


Commit MetaInfo

Revision97ff4f74b6691ce2278485ce1d5e26a51ee41fef (tree)
Time2021-08-14 17:09:46
Authorhayao <hayao@fasc...>
Commiterhayao

Log Message

[fix] : Fixed SC2002

Change Summary

Incremental Difference

--- a/alterlinux-live-info/alterlinux-live-info
+++ b/alterlinux-live-info/alterlinux-live-info
@@ -76,7 +76,7 @@ if [[ "${shellmode}" = false ]]; then
7676 else
7777 # 項目を取得する
7878 items=()
79- for _item in $(cat "${infofile}" | cut -d ':' -f 1 | sed "s|^ *||g; s| *$||g" |sed 's| \+|_|g' | tr '[:upper:]' '[:lower:]'); do
79+ for _item in $(cut -d ':' -f 1 < "${infofile}" | sed "s|^ *||g; s| *$||g" |sed 's| \+|_|g' | tr '[:upper:]' '[:lower:]'); do
8080 items+=("$(echo "${_item}")")
8181 done
8282 unset _item
@@ -85,8 +85,8 @@ else
8585 values=()
8686 PREV_IFS="${IFS}"
8787 IFS=$'\n'
88- readarray -t values < <(cat "${infofile}" | cut -d ':' -f 2- | sed "s|^ *||g; s| *$||g" | grep -v ^$ )
89- line_number=$(( "$(cat "${infofile}" 2> /dev/null | wc -l)" - 1 ))
88+ readarray -t values < <(cut -d ':' -f 2- < "${infofile}" | sed "s|^ *||g; s| *$||g" | grep -v ^$ )
89+ line_number=$(( "$(wc -l < "${infofile}")" - 1 ))
9090 IFS="${PREV_IFS}"
9191
9292 for line in $(seq 0 "${line_number}"); do
Show on old repository browser