소스 검색

shell check war warning against unnecessary use of cat

William Sellitti 3 년 전
부모
커밋
6d64098288
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      deploy/proxmoxve.sh

+ 2 - 2
deploy/proxmoxve.sh

@@ -93,8 +93,8 @@ proxmoxve_deploy(){
   # posted to the webserver.
   cat << HEREDOC > "$_proxmoxve_temp_data_file"
 {
-  "certificates": "$(cat "$_cfullchain"|tr '\n' ':'|sed 's/:/\\n/g')",
-  "key": "$(cat "$_ckey"|tr '\n' ':'|sed 's/:/\\n/g')",
+  "certificates": "$(tr '\n' ':' < "$_cfullchain" | sed 's/:/\\n/g')",
+  "key": "$(tr '\n' ':' < "$_ckey" |sed 's/:/\\n/g')",
   "node":"$_node_name",
   "restart":"1",
   "force":"1"