0

I don't know what is going on...

d@d-SVF15A17CDB:~/University/CSC209/a1$ gcc -o remvocals remvocals.c
d@d-SVF15A17CDB:~/University/CSC209/a1$ dir
remvocals  remvocals.c
d@d-SVF15A17CDB:~/University/CSC209/a1$ remvocals
remvocals: command not found
1

You need to actually run the file:

Make sure the file is executable (you can learn more about file permissions here). If gcc succeeds in linking it should already be executable (thanks @steeldriver):

chmod +x remvocals

Execute the file:

./remvocals
| improve this answer | |
  • Interesting, I remember the way I posted worked in another computer, why? – JOX Jan 28 '15 at 2:38
  • It can work if the folder you're working on is on the PATH environment variable. I don't think that's what you want though. To see what's on the PATH use: echo $PATH. – Reut Sharabani Jan 28 '15 at 2:40
  • 3
    It shouldn't be necessary to chmod +x the file: it will be executable by default if gcc successfully links the binary. – steeldriver Jan 28 '15 at 2:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.