I am trying to make a shortcut code with gcc. The purpose is to compile and then automatically execute the compiled file.The code I am using looks like this,
gcc [email protected] -o $@ ./$@ But it won't execute as purposed. It is saying something like Segmentation Fault. How should I fix this?
$@instead of$1? The way you've written the script, it won't work with multiple arguments.$@could make sense in the context of aMakefile. Still, not enough information given here to figure out what's going on...