Quote:
Originally Posted by
frank_rizzo
The echo WORKS.
But the CASE don't work with "\$$i".
I want the CASE compare the arguments ( $1, $2, ...) with what they can contain.
for example in C I would write:
for(i=1; i<argc; i++)
{
if(strcmp(argv[i], "-f")==0)
opz_f=1;
else if(strcmp(argv[i], "-w")==0)
{
opz_w=1;
w=i;
}
}
How do you implement argv[i] == "string" in BASH SCRIPT?