From 00cdaba8023fbf186bd335f8d860409462a22641 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Wed, 13 Mar 2024 13:07:28 +0300 Subject: [PATCH] Su : Redir command output to the void. --- module/common/bash/module/Su.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/common/bash/module/Su.sh b/module/common/bash/module/Su.sh index 2ef0c2d1..ca3b71b9 100644 --- a/module/common/bash/module/Su.sh +++ b/module/common/bash/module/Su.sh @@ -8,7 +8,7 @@ function s() { # Run something as root. Runs command as a current user if su is not available. # Usage: sudo function sudo() { - if command -v su; then + if command -v su &> /dev/null; then su -c "$(echo ${*} | tr '\n' ' ')" else ${*}