Forrest logo
back to the ${command} tool

histexpand:tldr:f307e

histexpand: Run a command with the first argument of the previous command.
$ ${command} !^
try on your machine

The command "${command} !^" is a shell or command line instruction that can be executed in Unix-based operating systems. Here's how it works:

  1. "${command}" is a placeholder, representing the name of an actual command or program that needs to be executed. It could be any valid command available in the system.

  2. "!^" is a notation known as history substitution, specifically the "first argument" history substitution. It refers to the first parameter or argument of the previous command executed in the shell.

Combining both parts, the command "${command} !^" is used to execute a specific command and pass the first argument from the immediately preceding command executed in the shell as its argument.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the ${command} tool