From 9353586df03cb6387cc1213209ca31fd32079e85 Mon Sep 17 00:00:00 2001 From: David Personette Date: Sun, 7 Jul 2019 11:34:01 -0400 Subject: [PATCH] samba.sh try yet again to get the while loop right --- samba.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samba.sh b/samba.sh index 32e5daa..745be71 100755 --- a/samba.sh +++ b/samba.sh @@ -242,17 +242,17 @@ shift $(( OPTIND - 1 )) [[ "${CHARMAP:-""}" ]] && charmap "$CHARMAP" while read i; do global "$i" -done <<< $(env | awk '/^GLOBAL/ {sub (/^[^=]*=/, "", $0); print}') +done < <(env | awk '/^GLOBAL/ {sub (/^[^=]*=/, "", $0); print}') [[ "${IMPORT:-""}" ]] && import "$IMPORT" [[ "${PERMISSIONS:-""}" ]] && perms [[ "${RECYCLE:-""}" ]] && recycle while read i; do eval share $(sed 's/^/"/; s/$/"/; s/;/" "/g' <<< $i) -done <<< $(env | awk '/^SHARE/ {sub (/^[^=]*=/, "", $0); print}') +done < <(env | awk '/^SHARE/ {sub (/^[^=]*=/, "", $0); print}') [[ "${SMB:-""}" ]] && smb while read i; do eval user $(sed 's/^/"/; s/$/"/; s/;/" "/g' <<< $i) -done <<< $(env | awk '/^USER/ {sub (/^[^=]*=/, "", $0); print}') +done < <(env | awk '/^USER/ {sub (/^[^=]*=/, "", $0); print}') [[ "${WORKGROUP:-""}" ]] && workgroup "$WORKGROUP" [[ "${WIDELINKS:-""}" ]] && widelinks [[ "${INCLUDE:-""}" ]] && include "$INCLUDE"