Mikhail R. Mikhail R. - 1 year ago 52
Bash Question

What does !vi mean?

I'm watching a video course on bash programming and the lecturer is constantly switching back and forth between his instance of the vi text editor and the command line by existing out of vi and coming back in using this command:

. What I'm able to infer from this is that it probably means open vi along with the last file that was in the process of editing before vi was closed, but when I try doing that in my command line, that's not what happens. Vi just opens up with its welcome message.

Answer Source

In Bash, !vi expands to the most recent command starting with "vi". See History Expansion in the Bash manual.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download