Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

rerun code from history

# Using an exclamation point followed by a number is arguably the simplest use:
!636

# However, you can also run the last executed command directly without knowing its history number:
!!

# Or you can run two commands back:
!-2
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #rerun #code #history
ADD COMMENT
Topic
Name
1+2 =