Question: When running commands, sometimes maybe you need to run a command with the argument from the last command. How can you do this?

Of course, excepting the use of the arrow keys and `Del` keys: `↑``←``←``←`...`←``→``→``Del``Del``Del`...`Del``<new_command>`.

Answer: 
There are a few shortcuts if you want all of the arguments from the previous command, or just the last argument.

* For all of the arguments: `<command> !*`
* For just the last argument:
`<command> !$`

Examples:

```
ls foo/ bar/
ls !* # Gives the results of ls foo/ bar/

ls foo/ bar/
ls !$ # Gives the results of ls bar/

```

If you want a single argument from a list of arguments from the previous command, you can use `<command> !!:<argNumber>`

Example:

```
ls foo/ bar/ baz/
ls !!:2 # Gives the results of ls bar/
ls foo/ bar/ baz/
ls !!:1 # Gives the results of ls foo/

```
To take the `n`th argument from your previous command, type `Alt`+`n`+`Alt``\_`. For example, after:

```
$ echo 1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10

```

typing `echo` followed by `Alt``2``Alt``\_` will give you this at the next prompt:

```
$ echo 2

```

The "screenshot" after you've hit `Alt``2` is:

```
(arg: 2) echo

```

You can repeat `Alt``\_` multiple times to get the `n`th argument of previous commands in succession.

Another useful idea is to define alias `r="fc -s"`. Then, you can do command substitutions:

```
$ echo 1
1
$ r echo=history
history 1
27755  history 1

```