Utility commands

This section describes utility commands.

alias

The alias command manages aliases for commonly used commands. When called with no parameters, it displays the currently set aliases. When called with the -d flag, it deletes the specified alias. When called with a name and a string, it creates a new alias.

Syntax

  alias [-d alias_name] | [alias_name [alias_string]]
  
  

Options

-d alias_name Delete the specified alias.
alias_name Set the specified alias to be alias_name.
alias_string Set alias_name to alias_string.

batch

The batch command downloads and executes a command file. If no parameters are given, the batch command will use the file specified by the batchpath and/or batchfile environment variables. If a file name is given, the batch command will look for this file in the location specified by the batchpath environment variable. If a fully-qualified ftp or tftp URL is given, the batch command will use this file. File URLs can take the following forms:

  tftp://server[:port]/path/file
  
  
  ftp://[username[:password]@]server/path/file
  
  

Syntax

  batch
  
  [file_or_url] 
  

Options

file_or_url Run the specifed file.

Examples

batch (requires batchfile and/or batchpath to be set)
batch setup.nrsh (requires batchpath to be set)
batch tftp://128.9.1.2/home/joe/setup.nrsh
batch ftp://128.9.1.2/pub/setup.nrsh
batch ftp://joe:joespw@128.9.1.2/home/joe/setup.nrsh

history

The history com mand displays the contents of the history substitution buffer for the current command session.

Syntax

history

Use the following combinations to use the history buffer contents to repeat or alter a command:

Enter To substitute entry with the:
!! Most recent history entry.
!srch_str Most recent history entry starting with srch_str.
!?srch_str Most recent history entry containing with srch_str.
!-n nth preceding entry in history buffer.
!n nth entry in history buffer.
^srch_str^subst_str Most recent history entry starting with srch_str, replacing srch_str with subst_str.
^?srch_str^subst_str Most recent history entry containing srch_str, replacing srch_str with subst_str.