Use += when concatenating strings
This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
#! /bin/bash -
 | 
			
		||||
# set -x 
 | 
			
		||||
 | 
			
		||||
source ./log_helpers
 | 
			
		||||
@@ -34,12 +34,13 @@ if [ "${general_utils_sourced:-1}" = "1" ]; then    # include only once
 | 
			
		||||
        local ps_pid=$!  # remember pid of process substitution
 | 
			
		||||
 | 
			
		||||
        local __result=""
 | 
			
		||||
 | 
			
		||||
        while read __tmp <&$fd; do
 | 
			
		||||
            if ! [ -z "$__tmp" ]; then
 | 
			
		||||
                __result="${__result}$__tmp"
 | 
			
		||||
                __result+=" $__tmp"
 | 
			
		||||
            fi
 | 
			
		||||
        done
 | 
			
		||||
        
 | 
			
		||||
 | 
			
		||||
        exec {fd}>&-    # close fd (i.e. process substitution)
 | 
			
		||||
        wait $ps_pid    # wait for the subshell to finish
 | 
			
		||||
 | 
			
		||||
@@ -49,6 +50,7 @@ if [ "${general_utils_sourced:-1}" = "1" ]; then    # include only once
 | 
			
		||||
        printf '%s' "$__result"
 | 
			
		||||
        return $__result_code
 | 
			
		||||
    }
 | 
			
		||||
    # exec_process_substitution 'opkg --noaction list'
 | 
			
		||||
 | 
			
		||||
    usage () {
 | 
			
		||||
        echo "Usage: $PROGRAM [--file config] [--?] [--help] [--version] [--dbg]" 
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user