I have the same issue with similar error as below...
$ ./tSch_Csc.sh.x
./tSch_Csc.sh.x: /home/MAIN/REP/*64241*./tSch_Csc.sh.x: No such file or directory
./tSch_Csc.sh.x: line 0: exec: /home/MAIN/REP/*64241*./tSch_Csc.sh.x: cannot execute: No such file or directory
can someone please advise where this is going wrong...
I have also tried to compile the ".c " file manually as below which shc generated. but no luck...
The issue is that, it works fine on "Machine A" which is as below
uname -a
Linux Machine A 2.6.32-279.2.1.el6.x86_64 #1 SMP Thu Jul 5 21:08:58 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
But when i move this script to "Machine B" which seem to be similar to A as below..
uname -a
Linux Machine B 2.6.32-279.2.1.el6.x86_64 #1 SMP Thu Jul 5 21:08:58 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
Then, it throws these errors..
./tSch_Csc.sh.x
./tSch_Csc.sh.x: /home/MAIN/REP/*64241*./tSch_Csc.sh.x: No such file or directory
./tSch_Csc.sh.x: line 0: exec: /home/MAIN/REP/*64241*./tSch_Csc.sh.x: cannot execute: No such file or directory
I did try to copy the ".c" file to Machine B and compiled it and generated the script as below... but still no luck...
gcc tSch_Csc.sh.x.c -o tSch_Csc.sh.x
what could be missing.... or what else could i check for ...
If your folder really does have *'s in it, any use of the folder name unquoted will try and expand these *'s into other filenames. So it could be a bug in the script rather than shc.
Now, I move test1.sh.x to "Machine B" and execute test1.sh.x as below.. and it throws me these errors...
./test1.sh.x
./test1.sh.x: /home/*64241*./test1.sh.x: No such file or directory
./test1.sh.x: line 0: exec: /home/*64241*./test1.sh.x: cannot execute: No such file or directory
---------- Post updated 11-07-13 at 03:31 PM ---------- Previous update was 11-06-13 at 05:37 PM ----------
Thanks for your replies again.
The issue is resolved now..Looks like the issue was with my shell bash (Machine A) vs ksh (Machine B)
On Machine A, where the original .sh was compiled using shc