Skip to main content

I'm new in linux trying to run .C program from another directory in script. script is in home directory and .C program is in Desktop directory. here is script. #!/bin/bash chmod 777 myscript cd /home/unifi-007/Desktop/ gcc main -o main.c ./main

#!/bin/bash chmod 777 myscript cd /home/unifi-007/Desktop/ gcc main -o main.c ./main 

But i'm not getting it right. how to execute main.c in script.

I'm new in linux trying to run .C program from another directory in script. script is in home directory and .C program is in Desktop directory. here is script. #!/bin/bash chmod 777 myscript cd /home/unifi-007/Desktop/ gcc main -o main.c ./main

But i'm not getting it right. how to execute main.c in script.

I'm new in linux trying to run .C program from another directory in script. script is in home directory and .C program is in Desktop directory. here is script.

#!/bin/bash chmod 777 myscript cd /home/unifi-007/Desktop/ gcc main -o main.c ./main 

But i'm not getting it right. how to execute main.c in script.

Source Link

how to run gcc command in script to exe main.c

I'm new in linux trying to run .C program from another directory in script. script is in home directory and .C program is in Desktop directory. here is script. #!/bin/bash chmod 777 myscript cd /home/unifi-007/Desktop/ gcc main -o main.c ./main

But i'm not getting it right. how to execute main.c in script.