r — Process a command history list

Format

r [old=new] [specifier]

Description

r is an alias for fc –s. Like fc –s, r reenters exactly one command without going through an editor. If a command specifier is given, r selects the command to reenter; otherwise, r uses the last command entered. To perform a simple substitution on the command before reentry, use a parameter of the form old=new. The string new replaces the first occurrence of string old. r displays the (possibly modified) command before reentering it.

See fc — Process a command history list for more information.

Related information

fc, history, sh