3 ms·
I'm not the person you replied to, but I was unaware of the fact that it was possible to tell the difference between the arguments ( and "(" in a regular progra
by Sophira 4y ago
I'm not the person you replied to, but I was unaware of the fact that it was possible to tell the difference between the arguments ( and "(" in a regular program. May I ask how? My understanding was that the shell stripped the quotes before it ever reached the program (and that the only method of bypassing that would have been to escape the quotes or enclose the argument in single quotes, for example).
- rascul 4y ago$ echo "(" '"("' ( "(" "(" the argument is ( '"("' the argument is "(" When you inspect argv in your program, you will see the argument including the quotes in the second example.
- Sophira 4y agoAh yes, that's what I meant by putting the argument in single quotes. I thought you were saying that the statement 'In both cases, they get the string “(“ in argv.' wasn't necessarily true. My apologies!