1

When i tried to excute the following export SENTRY_SECRET_KEY="k(#!st-6eb2y74=@^6s7a67fy5a&@p3y=57#aszb@hs)n^vv0#" I get the error "bash: !st: event not found" Please give me solution..

2 Answers 2

1

Use ' instead of " and your variable export will work.

The '!' is interpreted as a history invocation, so your command history is searched for 'st' which causes an 'event not found' message.

You can verify this with the following sequence:

ls /etc
a="k!ls"
b='k!ls'

and then:

$ echo $a
kls /etc
$ echo $b
k!ls
1

Please Use single quotes (') instead double quotes ("). Strings and special characters inside single quotes usage in bash variables are interpreted literally. For an example the usage of ! or $ symbols inside double quotes are interpreted as special characters. Please read more into the documentation. So your command will look like:

export SENTRY_SECRET_KEY='k(#!st-6eb2y74=@^6s7a67fy5a&@p3y=57#aszb@hs)n^vv0#'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .