CLI: Basic Command Line Parameters and Editing

Document created by RSA Information Design and Development Employee on Oct 18, 2017
Version 1Show Document
  • View in full screen mode

NwConsole is like a Swiss army knife; there are all kinds of tools buried underneath its command line interface. NwConsole is multi-platform; executables are available for CentOS (it already ships on appliances), Windows, and Mac.

Basic Command Line Parameters

Here are some basic command line parameters:

  • To run a set of commands from a file:
    NwConsole -f /tmp/somefile.script
  • To pass in a list of commands from the command line:

    NwConsole -c <command1> -c <command2> -c <command3>

    This is not necessarily recommended except for very simple scripts. The bash interpreter can make mincemeat out of quoted strings if you do not escape properly. If you are having non-obvious errors passing via command line, switch over to reading from a file to see if that fixes the issues.

  • Normally, console exits after running commands passed via a file or command line, but if you want to keep the interactive prompt open after the commands are executed, pass -i on the command line.

  • And of course, you can just run NwConsole and type the commands in the console window.

Line Editing

You can use the keys in the following table when editing a command.

Ctrl-U Clears the current line
Ctrl-WDeletes the word that the cursor is on
Ctrl-AMoves the cursor to the beginning of the line
Ctrl-EMoves the cursor to the end of the line
Up arrowDisplays the previously executed command
Down arrowDisplays the command executed after the current command (only valid if the up arrow has been pressed)
Left arrowMoves the cursor to the previous character
Right arrowMoves the cursor to the next character
TabProvides context sensitive completion of most commands and their parameters. The Tab key is very helpful for editing.

For example, to view the Connecting to a Service help topic, at the command line, you can type mancon and then press the Tab key. NwConsole completes the command for you: man Connecting to a Service
Press enter to run the command and view the topic.
history Displays a numbered list of previous commands
history execute=# Executes a previous command, which is also equivalent to typing !#
For example, !1 executes the previous command.
history clear Clears all command history
history erase=# Erases a specific command from the history buffer. History is automatically stored from one session to the next.
You are here
Table of Contents > RSA Security Analytics Console > Basic Command Line Parameters and Editing