I looked at this question and googled, but can't find a definitive answer. What does !$ do when typed into terminal?I typedmkdir /path/to/dircd !$Which brought me to /path/to/dir but I still would like to know exactly what the !$ operator does in general.
shell command cd !$
command line;terminal
From  Bash Manual > History Expansion:Event Designator!      Start a history substitution, except when followed by        a blank, newline, carriage return, = or  (  (when the        extglob shell option is enabled using the shopt builtin).!n     Refer to command line n.Word Designators$      The  last word.  This is usually the last argument, but will        expand to the zeroth word if there is only one word in the line.So, !$ just repeats the last word from previous commandExample:$ echo Unix and LinuxUnix and Linux$ echo !$echo LinuxLinux$ cat dir1cat: dir1: Is a directory$ cd !$cd dir1After executing command with !$, press  and you will get the result of !$.