<!--Arbortext, Inc., 1988-2007, v.4002-->
<!DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD SolBook 3.5//EN" [
<!ENTITY options-common SYSTEM "options-common.sgm">
<!ENTITY synopsis-common SYSTEM "synopsis-common.sgm">
<!ENTITY % commonents SYSTEM "common.ent">
%commonents;
]>
<!--Arbortext, Inc., 1988-2007, v.4002-->
<?Pub EntList bull rArr sect>
<?Pub Inc>
<refentry id="multimode-1">
<!-- @(#)multimode.1 1.10 07/04/25 SMI; -->
<refmeta><refentrytitle>multimode</refentrytitle><manvolnum>1</manvolnum>
<refmiscinfo class="date">30 Jan 2007</refmiscinfo>
<refmiscinfo class="sectdesc">&man1;</refmiscinfo>
<refmiscinfo class="software">&software;</refmiscinfo>
<refmiscinfo class="arch">generic</refmiscinfo>
<refmiscinfo class="copyright">Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved</refmiscinfo>
</refmeta>
<refnamediv><indexterm><primary>multimode</primary></indexterm><indexterm><primary>allows you to execute multiple commands while preserving environment settings and remaining in the asadmin utility</primary></indexterm>
<refname>multimode</refname><refpurpose>allows you to execute multiple commands while preserving environment settings and remaining in the asadmin utility</refpurpose></refnamediv>
<refsynopsisdiv><title></title>
<synopsis><command>multimode  </command> [<option>-file</option> <replaceable>filename</replaceable>] [<option>-printprompt=true</option>] [<option>-encoding</option> <replaceable>encode</replaceable>] [<option>-terse=false</option>] [<option>-echo=false</option>]<?Pub Caret1></synopsis>
</refsynopsisdiv>
<refsect1 role="description"><title></title>
<para>Use <command>multimode</command> to process the asadmin commands. The command-line interface will prompt you for a command, execute that command, display the results of the command, and then prompt you for the next command. Additionally, all the asadmin option names set in this mode are
used for all the subsequent commands. You can set your environment and run commands until you exit <command>multimode</command> by typing &ldquo;exit&rdquo; or &ldquo;quit.&rdquo; You can also provide commands by passing a previously prepared list of commands from a file or standard input (pipe).
You can invoke <command>multimode</command> from within a <emphasis>multimode</emphasis> session; once you exit the second <emphasis>multimode</emphasis> environment, you return to your original <emphasis>multimode</emphasis> environment.</para>
<para>This command is supported in local mode only.</para>
</refsect1>
<refsect1 role="options"><title></title>
<variablelist termlength="medium">
<varlistentry><term><option>-file</option></term>
<listitem><para>reads the commands as defined in the file.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>-printprompt</option></term>
<listitem><para>allows the printing of asadmin prompt after each command is executed. Set this option to false when the commands are piped or redirected from the standard input or file. By default the option is set to true.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>-encoding</option></term>
<listitem><para>specifies the locale for the file to be decoded.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>-terse</option></term>
<listitem><para>indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well-formatted data for consumption by a script. Default is false.</para>
</listitem>
</varlistentry>
<varlistentry><term><option>-echo</option></term>
<listitem><para>setting to true will echo the command line statement on to the standard output. Default is false.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="examples"><title></title>
<example><title>Using <command>multimode</command> to execute multiple commands</title>
<screen>% <userinput>asadmin multimode --file commands_file.txt</userinput></screen>
<para>Where: <command>%</command> is the system prompt. The administrative commands are executed from the <filename>commands_file.txt</filename> file.</para>
</example>
</refsect1>
<refsect1 role="exit-status"><title></title>
<variablelist termlength="medium">
<varlistentry><term>0</term>
<listitem><para>command executed successfully</para>
</listitem>
</varlistentry>
<varlistentry><term>1</term>
<listitem><para>error in executing the command</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="see-also"><title></title>
<para><olink targetdoc="asrefman" targetptr="export-1">export(1)</olink>, <olink targetdoc="asrefman" targetptr="unset-1">unset(1)</olink></para>
</refsect1>
</refentry>
