Scripts fails if you change its code during the execution.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Scripts fails if you change its code during the execution.
# 1  
Old 07-04-2007
Scripts fails if you change its code during the execution.

So a script is working properly (tested many times) , then you add a new fine piece of code ,finaly its fails generally with a syntax error at the last line of the script.

Smilie... does anybody why this happens?

Code:
>uname -a                                                   
HP-UX test B.11.11 U 9000/800

Thx in advance.
# 2  
Old 07-04-2007
Quote:
Originally Posted by Klashxx
Smilie... does anybody why this happens?

Code:
>uname -a                                                   
HP-UX test B.11.11 U 9000/800

Would certainly help if you showed us the script. And the error it throws.
# 3  
Old 07-04-2007
This is not a particular Issue ,in fact i noticed this behavior with different scripts, all with may lines and complicated workflow, generaly the scripts fails with sintax error at the last line of the code but if you trace de logs , all the job is done.

If the script is fully charged in the machine's memory , wHow Could This Be Happening ?

Regards.
# 4  
Old 07-04-2007
Shell scripts do not support dynamic changes during execution. If you ignore this restriction you will get unpredicable results. Shells tend to read their scripts as needed, but using large buffers. Also ksh compiles a script dynamically during execution but it may not do this if you are tracing.
# 5  
Old 07-04-2007
Thanks Perderabo for clarify, I was guessing something like that.

Regards.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to check sub scripts execution?

I have a shell script which is used to get the input and have another shell script (a sub script) at the end of this shell script which is used to upload the inputs in the Oracle database. I can check the execution status of the parent script using sh -x script.sh. but this command doesn't show the... (1 Reply)
Discussion started by: srilaxman
1 Replies

2. Shell Programming and Scripting

find command fails mid-way during execution

I wish to search for a particular string say "Yellow_Colors" in all files in all folders in the current directory. Below is the command I use: find ./ -type f | xargs grep -i "Yello_Colors"However, my command does not traverse all files and folders and errors out mid-way with the below error... (7 Replies)
Discussion started by: mohtashims
7 Replies

3. Shell Programming and Scripting

Script execution fails

hi, i am trying to run this script, getting below error, can some one help me in this Error: -bash: on_failure.sh: line 23: syntax error: unexpected end of file ======================================================== # CHANGE HISTORY # # YYYYMMDD Change by Desription # --------... (2 Replies)
Discussion started by: szs
2 Replies

4. UNIX for Dummies Questions & Answers

Execution problem in running multiple scripts

hi all, I have 3 individual scripts to perform the task . 2nd script should run only after the 1st script and 3rd script must run only after first 2 scripts are executed successfully. i want to have a single script that calls all this 3 scripts .this single script should execute the 2nd script... (1 Reply)
Discussion started by: Rahul619
1 Replies

5. UNIX for Dummies Questions & Answers

Replacing char in filename scripts fails

Hi I'm trying to remove what I "think" is a bad character. How I got the bad character is when I downloaded jpgs onto my PC and then renamed the files using windows explorer. In cygwin, the files look like $ dir -l total 7840 ----------+ 1 None 3647968 Jul 21 08:41 2012-07-21\ (1).JPG... (6 Replies)
Discussion started by: SailingDreams
6 Replies

6. Shell Programming and Scripting

Stop execution of script if some condition fails

After my if condtion give rusult true then script should stop execution. Please advice...Thnaks in advance (1 Reply)
Discussion started by: vivek1489
1 Replies

7. Shell Programming and Scripting

Execution Problems with scan and change file data content

Input file >Read_1 XXXXXXXXXXSDFXXXXXDS ASDRXXXXXTGAGTXXXXXT TGTGATXXXXXAXXXXGXXA . . Desired output file >Read_1 XXXXXXXXXXXXXXXXXXDS ASDRXXXXXTGAGTXXXXXT TGTGATXXXXXXXXXXXXXA . . (5 Replies)
Discussion started by: patrick87
5 Replies

8. Shell Programming and Scripting

Execution difference in perl scripts for windows / AIX

Hi, I have perl script abc.pl which runs perfectly fine on windows ( execution from cmd). Now i tried to execute the same perl module on the AIX server after defining the captureoutput.pm and other relevant changes. But its behaving very weirdly as a portion of the URL which is formed by... (3 Replies)
Discussion started by: slayer0611
3 Replies

9. UNIX for Dummies Questions & Answers

Scripts execution

hello everybody: i think this is really quite of dummy question. after I write a new script, and give it the execute permission. some times its just enough to call its name to run the script , other times I need to include ksh or ./ScriptName . so how I can make all my scripts run by just... (9 Replies)
Discussion started by: aladdin
9 Replies

10. Shell Programming and Scripting

Please help on shell scripts execution

I have already posted the question. Because previous post has sinked so that I have to ask the question again. I created the script and chmod it as 755. The ksh shell is in bin. Now I typed ./script_name.ksh to execute the script in the directory of that script. The return message was: Ksh:... (13 Replies)
Discussion started by: duke0001
13 Replies
Login or Register to Ask a Question