From: Steven Baltakatei Sandoval Date: Fri, 10 Jul 2020 04:10:34 +0000 (+0000) Subject: style(unitproc):appendArgTar(): cat instead of tee /dev/null X-Git-Tag: 0.3.0~24 X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/commitdiff_plain/403e58f9b0ff58731ee212af7b0bae4f0b11b965?ds=sidebyside;hp=-c style(unitproc):appendArgTar(): cat instead of tee /dev/null --- 403e58f9b0ff58731ee212af7b0bae4f0b11b965 diff --git a/unitproc/bktemp-appendArgTar b/unitproc/bktemp-appendArgTar index 4d8df38..eadf648 100644 --- a/unitproc/bktemp-appendArgTar +++ b/unitproc/bktemp-appendArgTar @@ -8,7 +8,7 @@ try() { "$@" || die "cannot $*"; } appendArgTar(){ # Desc: Writes first argument to temporary file with arguments as options, then appends file to tar # Usage: appendArgTar "$(echo "Data to be written.")" [name of file to be inserted] [tar path] [temp dir] ([cmd1] [cmd2] [cmd3] [cmd4]...) - # Version: 1.0.5 + # Version: 1.0.6 # Input: arg1: data to be written # arg2: file name of file to be inserted into tar # arg3: tar archive path (must exist first) @@ -38,10 +38,10 @@ appendArgTar(){ if ! [ -z "$4" ]; then tmpDir="$4"; else yell "ERROR:$fn:No temporary working dir set."; exit 1; fi # Set command strings - if ! [ -z "$5" ]; then cmd1="$5"; else cmd1="tee /dev/null "; fi # command string 1 - if ! [ -z "$6" ]; then cmd2="$6"; else cmd2="tee /dev/null "; fi # command string 2 - if ! [ -z "$7" ]; then cmd3="$7"; else cmd3="tee /dev/null "; fi # command string 3 - if ! [ -z "$8" ]; then cmd4="$8"; else cmd4="tee /dev/null "; fi # command string 4 + if ! [ -z "$5" ]; then cmd1="$5"; else cmd1="cat "; fi # command string 1 + if ! [ -z "$6" ]; then cmd2="$6"; else cmd2="cat "; fi # command string 2 + if ! [ -z "$7" ]; then cmd3="$7"; else cmd3="cat "; fi # command string 3 + if ! [ -z "$8" ]; then cmd4="$8"; else cmd4="cat "; fi # command string 4 # Input command cmd0="echo \"\$1\""