Visit Our UNIX and Linux User Community


Error occured while running a script


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Error occured while running a script
# 1  
Old 09-04-2009
Error occured while running a script

Hi All,

In my application, I'm getting an error as type mismatch

Let me now explain the scenario,

I ran a shell script which calls some other scripts. All these scripts uses the environment variables.

Take for example, this script uses a variable 'PathDir'. I initiallized the value to that variable before i ran the initial script.

While the process was running, I gave as '> echo $PathDir ' by mistake in the command prompt of another window.

Later I could find the script was interuppted half the way with the error message as type mismatch and the process was stopped without completion.

My question is, is that line which I gave by mistake would create any problem?

I'm not running this script for the first time. I had run it so many times successfully for years. This is the first time I'm facing this problem.

If my explaination is not enough for you to catch the point, kindly lemme know.

Thanks for all you help in advance.
# 2  
Old 09-06-2009
As per the explanation and the command you execute nothing harm should happen. But really, I cannot understand exactly what you are meaning.

But i just tried what ever you explained, and got the following script.
Code:
while [ true ]
do
echo $ttt
sleep 5
done

Executed the above in the background, and tried doing what ever you said, but nothing affected. It always printed the ttt value, as it should. Because i exported it, and then invoked the script so it will get that value. After invoking if i change the value of that variable in the parent shell it wont affect.

Hope this helped, else come up with more clearer data.
# 3  
Old 09-09-2009
Thank you!!!

The problem is solved.

Previous Thread | Next Thread
Test Your Knowledge in Computers #824
Difficulty: Medium
HTML 5 specifies scripting application programming interfaces (APIs) that can be used with JavaScript.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Error running script

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

2. Shell Programming and Scripting

Error while running restart script -

Hi All I have written below basic restart script but it is giving me the following error - error - syntax error at line 40 : `else' is not matched . below is the script can someone assist me what i am doing wrong - #!/bin/ksh cd bin . ./set_sysm sleep 60 ./swstop -f 0 ... (1 Reply)
Discussion started by: honey26
1 Replies

3. UNIX for Dummies Questions & Answers

Sort : Write Error occured while merging

Dear Friends, I am sorting the file which contain 55Lakhs of records while Sorting i am facing issues Sort :0653-657 Write Error occured while merging Could you please any one tell me how to overcome this problem Thanks in advance (5 Replies)
Discussion started by: i150371485
5 Replies

4. Programming

Some error with number of keyboard inputs occured with this code for reversing a string..

i used a two-way linked list "node" for the code:: #include<stdio.h> #include<malloc.h> void insert(); void reverse(); struct node { char c; struct node *next; struct node *back; }*start=NULL; int main() { int n,i; (4 Replies)
Discussion started by: mscoder
4 Replies

5. Shell Programming and Scripting

Error running nawk script

Hi, I was trying to use nawk script given in this link https://www.unix.com/aix/19979-df-output-not-aligned.html 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

6. 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

7. 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

8. 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

9. UNIX for Dummies Questions & Answers

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: $ . 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. (5 Replies)
Discussion started by: HarryTellegen
5 Replies

10. UNIX for Dummies Questions & Answers

"Error 124 occured"?????

Error 124 occured... Hey everyone,i use DigitalUnix 4.0...does anyone know what kind of error is that??? Let me tell u the whole story...once upon a time(yesterday) i tried to install gearsoftware for a Plextor CD writer...i'm new in Unix and it took me a while but i made it... Before i... (1 Reply)
Discussion started by: Petza
1 Replies

Featured Tech Videos