Originally Posted by shiv garg
`gcc shiv.c -o shiv`
`chmod 777 shiv`
this was displaying an error that enter command not found.(ENTER is written in the first printf command in shiv.c file.
The main problem here is the weird usage of backticks, that mean command substitution
: the ./shiv command is executed and the output is executed again, hence the error you get. Why did you use backticks?
gcc shiv.c -o shiv
chmod 777 shiv
Moreover the chmod statement is not needed, since gcc produces an executable with the proper permissions.