next up previous contents index
Next: If Up: Commands Previous: Help   Contents   Index

History

The history command print or saves previous commands in the history list, or reexecutes an previous entry in the list. To modify the behavior of this command, see set history (p. [*]).

Examples:


     history               # show the complete history
     history 5             # show last 5 entries in the history
     history quiet 5       # show last 5 entries without entry numbers
     history "hist.gp"     # write the complete history to file hist.gp
     history "hist.gp" append # append the complete history to file hist.gp
     history 10 "hist.gp"  # write last 10 commands to file hist.gp
     history 10 "|head -5 >>diary.gp" # write 5 history commands using pipe
     history ?load         # show all history entries starting with "load"
     history ?"set c"      # like above, several words enclosed in quotes
     hi !reread            # execute last entry starting with "reread"
     hist !"set xr"        # like above, several words enclosed in quotes
     hist !55              # reexecute the command at history entry 55



2017-02-10