[ad_1]
There are many uses of ! operator in Linux.
See this article.
In your case, it is probably to check if the a command from history is given as input.
See the first point of the article.
[ad_2]
solved ‘!’ in input buffer in comparison in if statement