Here's the deal. I've got cygwin installed in Win7 envionment. This is the sequence of things I would do in a command line and everything works,
File mpc.exe is a 64-bit executable created by Intel Fortran Compiler
cp ./dir1/dir2/mpc.exe ./mpc.exe
./mpc.exe arg1 arg2
everything is fine
Want to create a script for that. The reason is I will want to execute the code for various values of arg2. file "script_mpc.sh" contains following,
#!/bin/sh
cp ./dir1/dir2/mpc.exe ./mpc.exe
./mpc.exe arg1 arg2
wait
return_val=$?
[ $retval -eq 0 ] && echo "successfully executed "
Now back at the command line,
$>chmod +x script_mpc.sh
$>./script_mpc.sh
error:
./script_mpc.sh: line 2: ./mpc.exe: No such file or directory
A very fresh beginner. Learning shell commands and scripting on the go. Please help.
#!/bin/bashat the top, not#!/bin/shBut I don't know if that's your problem, as your files are named with.shso maybe you don't mean bash in the question.cpcommand.