Shc : trying to test functionality "test" compiling but can not execute


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shc : trying to test functionality "test" compiling but can not execute
# 8  
Old 11-07-2013
I'm not sure where *64241* is coming from. My folders does'nt really have any thing like that neither my code..

For this i just created a sample script to test..
Code:
cat test1.sh
#!/bin/bash
         COUNTER=20
         until [  $COUNTER -lt 10 ]; do
             echo COUNTER $COUNTER
             let COUNTER-=1
         done

Then,....
Code:
shc -v -r -T -f test1.sh

Then i run the test1.sh.x as below.. which runs fine on "Machine A"
Code:
./test1.sh.x
COUNTER 20
COUNTER 19
COUNTER 18
COUNTER 17
COUNTER 16
COUNTER 15
COUNTER 14
COUNTER 13
COUNTER 12
COUNTER 11
COUNTER 10

Now, I move test1.sh.x to "Machine B" and execute test1.sh.x as below.. and it throws me these errors...
Code:
./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
Code:
echo $SHELL
/bin/bash

On Machine B, where it was throwing errors....
Code:
echo $SHELL
/bin/ksh

Changed it to bash as ..
Code:
bash

Now it works fine.. :-)

Thanks again for your replies..
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

If test script error: "Missing ]"

EDIT: Resolved Resolved by changing the first line to bash rather than csh, does bash and csh treat the brackets differently? Hi all, I'm doing to some basic stuff to teach myself "if" I've written the following: #!/bin/csh echo "This script checks for the test file" ... (1 Reply)
Discussion started by: Meshuggener
1 Replies

2. UNIX for Dummies Questions & Answers

What is the significance of sh -s in ssh -qtt ${user}@${host} "sh -s "${version}"" < test.sh?

Please can you help me understand the significance of providing arguments under sh -s in > ssh -qtt ${user}@${host} "sh -s "${version}"" < test.sh (4 Replies)
Discussion started by: Sree10
4 Replies

3. Shell Programming and Scripting

Help with error "por: 0403-012 A test command parameter is not valid."

Hi, im asking for help with the next script: echo ^; then if then printf "\033 query1.sh: export TERM=vt100 export ORACLE_TERM=at386 export ORACLE_HOME=/home_oracle8i/app/oracle/product/8.1.7 export ORACLE_BASE=/home_oracle8i/app/oracle export... (8 Replies)
Discussion started by: blacksteel1988
8 Replies

4. Shell Programming and Scripting

please help me " aks primality test"

i want to write a shell script for aks primality test ,can anybody help me to how to use logarithmic and mod function in shell script (2 Replies)
Discussion started by: abhijeet vaidya
2 Replies

5. Shell Programming and Scripting

error "test: [-d: unary operator expected" very confused.

Im trying to check if a series of directory exists and if not create them, and am having issues. All the instances of test return with the error "test: #!/bin/bash location_Parent=~/Documents/sight_of_sound location_IMG=~/Documents/Sight_of_sound/IMG location_AUD=~/Documents/Sight_of_sound/AUD... (4 Replies)
Discussion started by: orionrush
4 Replies

6. Shell Programming and Scripting

if returns "unknown test operator"

Greetings, using ksh on Solaris, I am trying to identify the current version of a package installed on multiple servers using if statement in a precursor to upgrading. I have searched the forums and have found many hits, reviewed 3 pages and have tried the different variations noted there. Also... (3 Replies)
Discussion started by: 22blaze
3 Replies

7. UNIX for Dummies Questions & Answers

"test: argument expected" error

Hi, No need to say I'm new to unix shell scripting. I have a very simple script that goes this way: for datos in `ls -rt $UNXLOG/26-Jan*` do export arch=`echo $datos |cut -d, -f1` if then export linea1=`grep Debut ${arch}` export horatot=`echo $linea1 |cut -d' ' -f5` ... (7 Replies)
Discussion started by: mvalonso
7 Replies

8. Shell Programming and Scripting

Awk - to test multiple files "read" permission ?

Hi Masters, Iam new to this Forum and this is my first post. My question is: I've some datafiles belongs the type (A, B, C) in the location 'export/home/lokiman ' dataA1.txt dataB28.txt dataC35.txt 1) I've to check the read permission for each file, if it not there then I've to... (1 Reply)
Discussion started by: lokiman
1 Replies
Login or Register to Ask a Question