From f52de197d6a9ea28e0333fcd7187f6eff0359b0d Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Wed, 16 Nov 2022 02:07:05 +0100 Subject: [PATCH] btrbk: use printf instead of echo Posix echo does not know about -e, -n flags, use printf instead. --- btrbk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btrbk b/btrbk index a942ec7..b53cd4a 100755 --- a/btrbk +++ b/btrbk @@ -2092,7 +2092,7 @@ sub system_write_raw_info($$;@) DEBUG "Writing (" . ($append ? "append:" . join(",", keys %$raw_info) : "create") . ") raw info file: $info_file"; my $ret = run_cmd( - { cmd => [ 'echo', '-e', '-n', '"' . (join '\n', @line) . '\n"' ] }, + { cmd => [ 'printf', quoteshell(join('\n', @line) . '\n') ] }, { ($append ? "append_to_file" : "redirect_to_file") => { unsafe => $info_file }, rsh => vinfo_rsh($vol), });