Link to home
Start Free TrialLog in
Avatar of ww111697
ww111697

asked on

execlp("echo","echo","$SHELL",NULL")

in the following code, why $SHELL and *.c will not be expanded by Unix shell?

int main()
{ if (fork()==0)
      execlp("echo","echo","$SHELL",NULL);
  else  
      execlp("echo","echo","*.c",NULL);
}
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ww111697
ww111697

ASKER

It is very good. Thank you very much
It is very good. Thank you very much