Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    assign path to a variable in C program


    I'm programing a C gnu/linux program and I need to execute this command:

    " find /home/javi/ -name "dmtcp_restart" | grep dmtcp/bin/dmtcp_restart"

    when the command has been executed I need to assign the output of the command to a array char variable.

    What linux instructions could be used for obtain this??


  2. #2
    Try the popen C function.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts