Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"event not found" trying to export a string with !0 [duplicate]

Tags:

bash

When I try to use export password="abcd!0", the base gave me an error: !0: event not found

Any help to solve this?

like image 433
Kuan Avatar asked Sep 19 '25 08:09

Kuan


1 Answers

! is a special character to bash it is used to refer to previous commands; eg,

!rm

will recall and execute the last command that began with the string "rm"

Try:

export password="abcd\!1"

or

 export password='abcd!1'
like image 88
Oz Bar-Shalom Avatar answered Sep 20 '25 23:09

Oz Bar-Shalom