I have written a small program that takes some input parameters from *argv[]
and prints them. In almost all use cases my code works perfectly fine. A problem on
The shell does expansion in double-quoted strings. And if you read the Bash manual page (assuming you use Bash, which is the default on most Linux distributions) then if you look at the History Expansion section you will see that !!
means
Refer to the previous command.
So !!!!
in your double-quoted string will expand to the previous command, twice.
Such expansion is not made for single-quoted strings.
So the problem is not within your program, it's due to the environment (the shell) calling your program.