admin@glassfish.java.net

--echo

From: Bill Shannon <bill.shannon_at_sun.com>
Date: Mon, 10 Aug 2009 14:01:13 -0700

Can someone help me understand the background and use of the --echo
option to asadmin?

At a very simple level this seemed to me to be like "sh -x", simply
echoing each command as its executed. This would be useful "asadmin
scripts" run in multimode, for instance.

In v2, the --echo option would echo more than just the original command.
It would also echo most (all?) of the settings of the other asadmin
options, such as --interactive, --secure, --terse, etc. I've copied
that behavior in v3.

However, this produces echo output that uses the old deprecated command
syntax, for example:

$ asadmin --echo --terse version
version --host localhost --port 4848 --interactive=true --echo=true --terse=true
...

changing that output to put the asadmin options first would be weird
unless it also included the word "asadmin", e.g.

asadmin --host localhost --port 4848 --interactive=true --echo=true --terse=true
version

That would be fine except when the commands are being executed in a
multimode script (which seems to me like the primary use case).

So, my question is, how important is it that --echo include values for
asadmin options that have not been specified? Would it be sufficient
if asadmin simply echoed the commands *as entered*?