Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fc(1) — SunOS 5.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

csh(1)

ksh(1)

sh(1)

source(1)

history(1)

NAME

history, fc − shell built-in functions to re-use previous command-lines from the current shell

SYNOPSIS

csh

history [ −hr ] [ n ]

ksh

fc [ −e ename  ] −nlr ] [ first [ last ] ]

fc −e − [ old=new ] [ command ]

DESCRIPTION

csh

Display the history list; if n is given, display only the n most recent events. 

−r Reverse the order of printout to be most recent first rather than oldest first. 

−h Display the history list without leading numbers.  This is used to produce files suitable for sourcing using the −h option to the csh built-in command, source(1). 

ksh

fc, in the first form, a range of commands from first to last is selected from the last HISTSIZE commands that were typed at the terminal.  The arguments first and last may be specified as a number or as a string.  A string is used to locate the most recent command starting with the given string.  A negative number is used as an offset to the current command number.  If the −l flag is selected, the commands are listed on standard output.  Otherwise, the editor program −e name is invoked on a file containing these keyboard commands.  If ename is not supplied, then the value of the variable FCEDIT (default /bin/ed) is used as the editor.  When editing is complete, the edited command(s) is executed.  If last is not specified then it will be set to first. If first is not specified the default is the previous command for editing and −16 for listing.  The flag −r reverses the order of the commands and the flag −n suppresses command numbers when listing.  In the second form the command is re-executed after the substitution old=new is performed. 

SEE ALSO

csh(1), ksh(1), sh(1), source(1)

SunOS 5.4  —  Last change: 15 Apr 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026