Error while running a script

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Error while running a script
# 1  
Old 02-04-2002
Error while running a script

Hi all,

By running a (command) script I'm getting the following
error: .: /usr/bin/test: cannot execute binary file

This is the command:

[oracle@HILinux scripts]$ . test

The script (test) is very simple

sqlplus user/password @1.sql
sqlplus user/password @2.sql

Can enyone tell me what the problem is.
# 2  
Old 02-04-2002
Just rename the script to something else. Test does exist already.

-rwxr-xr-x 1 root root 17444 Jan 19 2001 /usr/bin/test

or start it like this :

# 3  
Old 02-04-2002

Execute your script with full path name.
Example :



Change your directory to the script path and
execute this.
Example :

cd /usr/local/bin

If you to try to execute thus : (. test)

The O.S. tries to execute the /usr/bin/test command.
And the point before a command test (in your example) without slash (/) is to load variables in the subshell.

# 4  
Old 02-04-2002
Yes, I know. It was not my question neither was the . before the command my example Smilie
# 5  
Old 02-04-2002
Could you please restate your question?

Is your question regarding the syntax of your script?
There is a file in /usr/bin called "test" that exists on most UNIX boxes?

Please clarify...

# 6  
Old 02-05-2002
Hi all,

./test was a good solution. The script is running fine now.
Thank you all for reply.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Error running script

Hi, I have the the below script more if *\).*/\1/p' $1_dr) ]; then echo "ParallelGCThreads Found with Value" else echo "ParallelGCThreads Not Found - Add !!" fi $ ./ output.log ./ test: argument expected ParallelGCThreads Not Found - Add !! Why am i... (2 Replies)
Discussion started by: mohtashims
2 Replies

2. Shell Programming and Scripting

Error in running DB query by script

Hi I was trying to fetch data from database. But the number of rows exported were huge so i got the error. Experts please advice. Thanks a lot for your supprt. #: ./ ./ xmalloc: subst.c:3076: cannot allocate 1401346369 bytes (0 bytes allocated) (2 Replies)
Discussion started by: brij123
2 Replies

3. Shell Programming and Scripting

Error when running script in background

Hi guys, ./ & #!/usr/bin/ksh echo "No.Of Items :" read count echo "Report Time (Min):" read time some other command .... exit 0; thanks (3 Replies)
Discussion started by: asavaliya
3 Replies

4. Shell Programming and Scripting

Error while running script using nohup

Hi, I am running the below script. When i run the script normally it executes fine but when i run the same script using nohup it throws an error as syntax error at line 3: `(' unexpected . Can you let me know why it is so? while do . $(dirname $0)/ cd... (2 Replies)
Discussion started by: vignesh53
2 Replies

5. UNIX and Linux Applications

Getting error code when running the script 2 (RC)2

hi All, we have a script to remove the files from particular path,when we tryingto run manually the script went to success and removed the files but the same script which is running by other team it got failed and giving the error "2 (RC)2 "..what is the cause of the failure..and we passing the... (2 Replies)
Discussion started by: nagavenkatesh
2 Replies

6. Shell Programming and Scripting

Error running nawk script

Hi, I was trying to use nawk script given in this link but when i do this im getting this error $ df -k|formatDF.nawk -ksh: formatDF.nawk: not found Can anyone help me on this... (6 Replies)
Discussion started by: niteesh_!7
6 Replies

7. Solaris

Error when running script

Hi All, Need your guuys help here. #!/bin/bash { echo "POLICY LIST" echo "====================================" bppllist echo " " echo "POLICY DETAILS" echo "====================================" for type in daily weekly monthly quarterly echo... (6 Replies)
Discussion started by: ronny_nch
6 Replies

8. UNIX for Dummies Questions & Answers

Getting error when running script through crontab

Hi all, I wrote small script for Solaris and when I am running it through command prompt its ok, but when I trying to run it using crontab, i am getting error like: dbloader: fatal: open failed: No such file or directory /tmp/ line 5: 8304 Killed ... (4 Replies)
Discussion started by: nypreH
4 Replies

9. Shell Programming and Scripting

error in in running script

Hi all, I have created a script file .sh and had some allias commands, local variable, some grep features, and listing files/directories, and it worked correctly and I got the outputs I am looking for after I run the script . However, some of the grep commands and some other functions did not... (2 Replies)
Discussion started by: aama100
2 Replies

10. Shell Programming and Scripting

Error while running your script -- Balamv

When I run this, I am getting the below error. Why? Pls help me #!/bin/ksh echo Hello World dirs="not_using_0" for entry in *; do && dirs="$dirs $entry" done dirarray=($dirs) index=1 while }" ] ; do echo "${index}: ${dirarray}" index=`expr $index + 1` done while ; do echo -n... (1 Reply)
Discussion started by: balamv
1 Replies
Login or Register to Ask a Question