I know that there is the
!! command to reuse the previous command. How would one reuse the file or directory specified in the previous command but use a different command on it?
Example: I want to see what is the content of a file, and if necessary delete it. Something like:
$ cat example.txt "output indicates deletion" $ rm !!