/* myexecvp.c  Exemplo de uso da system call execvp
  - Adaptado de Phil Cornes, Linux A-Z pg 206 */

#include <stdio.h>
int main (int argc, char ** argv)
{
  if (argc==1){
    printf("Uso: myexecvp <comando> <parametros> \n");
    exit(1);
  }
  printf("Comando que queremos executar: %s\n", argv[1]);

  execvp(argv[1], &argv[1]);
  printf("Sorry... culdn't run that!\n");
}