HISTORY Command

HSI Version: 

3.4.1

Purpose: 

provide command line history and re-execution

Aliases: 

  r  [alias for "hist -s]

Command Format: 

hist[ory] [-e ename] [-nlr] [first [last ] ] 
    or
hist[ory] -s [old=new] [cmd_string]

Options: 

-e:    specifies editor name to use with first form of the command. If not specified, then the 

environment variables "HISTEDIT" or "FCEDIT" are checked, and if neither is set, then

"/bin/edit" is used.


 -l:    specifies <listing> action to display the commands on the listing file
-n:    if specified, suppresses command numbers when editing

Keywords: 

 none

Usage Notes: 

The first form provides for listing or editing a range of command as described below, and the second form provides for re-executing the most recent command that starts with the string <cmd_string> (or the most recent command if <cmd_string> is not given), and optionally substituting the first occurrent of <old> with <new>.




Example: 

 hist - lists history


 r 60 - re-execute command number 60


r HSI=HTAR ls  - re-execute last "ls" command, substituting the first occurrence of the string "HSI" with the string "HTAR".

Related Command(s):