Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22011

how come './file' runs c++ program and also bash scripts? [closed]

$
0
0

when I do gcc someFile.cpp -o test and then do ./test(a file which contains strange characters) it runs the program and when I make a bash script file nano test.sh and run it by ./test.sh it runs the bash script. How does the terminal know if the ./file is a bash file or C++ compiled code?


Viewing all articles
Browse latest Browse all 22011

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>