invalid command name "gcc" while executing "gcc rsa.c -o rsa -lm" (file "./run.sh" line 1)
does gcc-4.9.2 works correctly on ns-2.35 or is it gcc-4.4
invalid command name "gcc" while executing "gcc rsa.c -o rsa -lm" (file "./run.sh" line 1)
does gcc-4.9.2 works correctly on ns-2.35 or is it gcc-4.4
Instead of running the script as ./run.sh, be sure that the first line of the script is #!/bin/bash and run it with bash run.sh.
which gcc? – earthmeLon Oct 11 '15 at 18:46run.sh? – earthmeLon Oct 11 '15 at 18:48which gcc. What happens when you placewhich gccat the top of your script and try to run it. It should have output. – earthmeLon Oct 11 '15 at 18:53$PATH, most likely. Maybe it's as simple as placing#!/bin/bashat the top of your script, but it seems like you have bigger problems than that. What shell is it using?echo $0should tell you if it'sshorbashor what. – earthmeLon Oct 11 '15 at 19:09which gccin the terminal, not in the script? Does it actually give you good output? – earthmeLon Oct 11 '15 at 19:11whichwon't work, most likely nothing will work. We need to get your shell working by determining which shell you're using and why your Environmental Variables aren't loading. – earthmeLon Oct 11 '15 at 19:12#!/bin/bashto the top of the script? Does that help at all? – earthmeLon Oct 11 '15 at 19:16bash run.shvs./run.shthat's making it work? – earthmeLon Oct 11 '15 at 19:26i mean bash run.sh
– Rakend Raj Oct 11 '15 at 19:28tclerror than a bash one: are you sure you are executing this command in a bash shell? – steeldriver Oct 11 '15 at 20:32