output

Definition

To redirect the output to a file and the console

Command Usage

Syntax

output [-m file|both] <FILE>

output [-m term|mute]

Command Arguments
Name Description
<FILE> A file name and a path
<MODE> Possible values: file | term (default) | both

Detailed Information

The output command activates the redirection of the output stream to a text file, to the console (by default), or to both the file and the console.

The different modes of the command are the following:

  • file: The command results are written in the file whose path is set by the <FILE> argument
  • term: The command results are written on the console
  • both: This mode is equivalent to the combination of both the file and term modes
  • mute: The command results are not written on the console

Notes

  • If the mode is not set and no argument is specified, the default value is term
  • If the mode is not set and a filename is set as the argument, the default value is file

The prompt changes according to the redirection mode:

  • > : Redirects the output stream to the console
  • f< : Redirects the output stream to a file
  • f<> : Redirects the output stream to both outputs

Examples

  • Admin+> output -m both console_capture.txt: Redirects the output to both the console and a text file (console_capture.txt) stored in the bin/ subfolder in the installation directory
  • Admin+> output -m file logs\\console.txt: Redirects the output to a text file (console.txt) located in the <INTALL_DIR>\bin\logs\ folder
  • Admin+> output -m file logs/console.txt: Redirects the output to a text file (console.txt) located in the <INTALL_DIR>/bin/logs/ folder
  • Admin+> output console.txt: Redirects the output to a text file (console.txt) located in the <INTALL_DIR>\bin\ folder
  • Admin+> output: Redirects the output to the console

Authorization

You must have a specific role in your SAP CC user profile. Refer to the SAP CC Security Guide for more information about the necessary authorizations.

Messages

Code Message Action
to.file OK: Output redirected to the file "{file}".  
to.term OK: Output redirected to the console.  
to.both OK: Output redirected both to the file "{file}" and to the console.  
bad.value Error: The redirection mode "{mode}" is not valid.  
bad.path Error: Cannot create the file "{file}".  
illegal.option Error: The specified option "{}" is illegal.  
option.value.missing Error: The redirection mode is expected.  
option.file.missing Error: A file name is expected for this mode.  
parameter.unexpected Error: The parameter "{}" is not expected.