From 6dfaaa702cf1a37219e2e22b3fa302a5364eca55 Mon Sep 17 00:00:00 2001 From: neil Date: Tue, 8 Mar 2016 20:55:54 +0800 Subject: [PATCH] minor, use "echo" for more compatible --- le.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/le.sh b/le.sh index 5dca6265..e2c19592 100755 --- a/le.sh +++ b/le.sh @@ -285,14 +285,14 @@ _setopt() { __val="$(echo $__val | sed 's/&/\\&/g')" fi text="$(cat $__conf)" - printf "$text" | sed "s|^$__opt$__sep.*$|$__opt$__sep$__val$__end|" > "$__conf" + echo "$text" | sed "s|^$__opt$__sep.*$|$__opt$__sep$__val$__end|" > "$__conf" elif grep -H -n "^#$__opt$__sep" "$__conf" > /dev/null ; then if [[ "$__val" == *"&"* ]] ; then __val="$(echo $__val | sed 's/&/\\&/g')" fi text="$(cat $__conf)" - printf "$text" | sed "s|^#$__opt$__sep.*$|$__opt$__sep$__val$__end|" > "$__conf" + echo "$text" | sed "s|^#$__opt$__sep.*$|$__opt$__sep$__val$__end|" > "$__conf" else _debug APP