help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] storing a command in a variable


From: lxnf98mm
Subject: [Help-bash] storing a command in a variable
Date: Fri, 12 Apr 2013 13:14:12 -0500 (CDT)
User-agent: Alpine 2.00 (LRH 1167 2008-08-23)

Often I do something like

cmd="command arg"
echo "${cmd}" >>my_log
eval "${cmd}" 2>&1 >>my_log

and many times I have read on this list that storing a command in a variable is 
a bad thing to do
What is a better/safer way of doing this

Richard



reply via email to

[Prev in Thread] Current Thread [Next in Thread]