Meruemu Meruemu - 3 months ago 6x
Linux Question

What does ./!$ mean in Linux?

A noobie Linux learner here.

I created a python script and

chmod 700
, when I was going to using
, my instructor came and use
to run the file.

What does the
that actually mean? I couldn't google it out. I'd greatly appreciate for a link of cheatsheet for the similar commend too.

Thanks in advance.


Suppose I just ran a command python This was my last command I entered into the shell. However, its argument was

Remembering that ./ refers to the current working directory, when I type ./!$ I get the following output:

$ ./!$
./ line 1: import: command not found
./ line 2: $'\r': command not found
./ line 3: syntax error near unexpected token `('
'/ line 3: `df = pd.DataFrame([

By context clues my last argument was used as the !$.

If I enter several arguments such as python I get:

$ ./!$
./ line 1: import: command not found
Unable to initialize device PRN

Confirming my intuition.