shell - what can I do so that my C script can execute binary file? -
so did gcc -wall -o file file.c
, program works echo abc | ./file
, when try sh file abc
, says file : file cannot execute binary file
, can fix issue? c prototype int main(int argc, char **argv)
, not sure if helps.
thanks!
you tried execute file (that compiled executable) shell script. doesn't work. did mean
sh -c ./file
Comments
Post a Comment