From 57aa1df8d8afa79716dbcc1e5268fe565cafa782 Mon Sep 17 00:00:00 2001 From: Camille Lafitte Date: Tue, 27 Aug 2024 17:48:40 +0200 Subject: [PATCH] Remove eval usage * We can execute directly a variable content * input/output in this case must be explicit and can't be set in variable --- screen-save-all-sessions | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/screen-save-all-sessions b/screen-save-all-sessions index 7a29680..4072a91 100755 --- a/screen-save-all-sessions +++ b/screen-save-all-sessions @@ -31,16 +31,16 @@ do savedir="~${screen_user}/.screen-save/$(date +%Y-%m-%d)/" command="mkdir -p ${savedir}" if [ "$EUID" -ne 0 ]; then - eval "${command}" + ${command} else su - "${screen_user}" -c "${command}" fi fi - command="${SCRIPTDIR}/screen-save ${screen_pid} ${savedir}