help-bash
[Top][All Lists]
Advanced

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

[Help-bash] dry run


From: Robert Durkacz
Subject: [Help-bash] dry run
Date: Tue, 20 Nov 2012 00:16:36 +1100

Hello,

There does not appear to be a dry-run option for bash. A dry run
option would be something akin to a combination of the -x and -n
options. When a script is processed by bash in dry-run mode there is
output to stdout or stderr the sequence of commands that bash
determines to run, something like -x, but the commands are not in fact
executed, as with -n

If the output were to be captured as a script, that script itself
could be run by a normal invocation of bash, giving the same result,
output and side-effects, as the original script would give. If the
captured script were executed in dry-run mode the output should be the
same as the input.

make has a dry run option as described,  "-n".

A typical use would be determine what a complicated script, like
libtool, will end up doing.

>From googling, people have posted suggestions as to how to achieve
this behaviour in scripts. This indicates that there is a demand for
such a feature and confirms that it is no t available as an option to
bash.

My question is why can't such an option or be provided, or perhaps it
can be provided, and if this question has been asked and answered many
times, where could I find the records of that.

-R.D



reply via email to

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