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

Re: Logging of commands in a bash script to a file

On Wed, Apr 23, 2014 at 8:06 AM, Daniel Bareiro <daniel-listas@gmx.net> wrote:
> I'm writing a bash script that runs several routing commands. I would
> like these commands, on a part of the script, plus run, are saved to a
> log file.
> I guess maybe it could be done by putting the commands in a variable and
> then do:
> $CMD
> echo $CMD

Do you mean like "set -v" or "set -x"? Put one of those commands at
the top of your script and see if it does what you need.


Reply to: