LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-27-2012, 04:46 AM   #1
Reignfire
Member
 
Registered: Jun 2012
Posts: 56

Rep: Reputation: Disabled
computer doesn't recognise changes in my script


Hi,

When i change some code in my script and save it, the computer always runs the old script as if i didn't save the file. Only when i save it to another name it works. How can i fix that problem?
 
Old 09-27-2012, 06:19 AM   #2
SecretCode
Member
 
Registered: Apr 2011
Location: UK
Distribution: Kubuntu 11.10
Posts: 562

Rep: Reputation: 102Reputation: 102
Some basic information that I think you should have included in your post:
What distro?
What script language?
What editor are you using?
How are you calling the script?
 
Old 09-27-2012, 06:24 AM   #3
Reignfire
Member
 
Registered: Jun 2012
Posts: 56

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by SecretCode View Post
Some basic information that I think you should have included in your post:
What distro?
What script language?
What editor are you using?
How are you calling the script?
I think i has something to do with the file getting stucked in the cache of my RAM and doesn't get refreshed. It's on a debian distro, it happends to al kinds of script languages. The code is right that's not the problem cause sometimes it does work. I'm running the code on a compute cluster (several servers working as one in a grid engine)
 
Old 09-27-2012, 11:04 AM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,007

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
And what basic checking have you done? Maybe as simple as:

1. Write simple script
2. Cat file to check same as when saved
3. Run script and check results
4. Edit script
5. See 2
6. See 3
 
Old 09-27-2012, 12:01 PM   #5
JohnGraham
Member
 
Registered: Oct 2009
Posts: 467

Rep: Reputation: 139Reputation: 139
Sometimes when I'm running code on an NFS client, I notice that updated versions of shared libraries aren't being used - every time I've noticed it, doing a quick "ls /path/to/libdir" or "ls libname.so" does the trick (I assume because it's forcing the system to see if the file handle is stale). Maybe you could try making a simple script that lists/cats the script before executing it.
 
Old 09-27-2012, 02:09 PM   #6
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
Quote:
Originally Posted by Reignfire View Post
...When i change some code in my script and save it, the computer always runs the old script ...
You may have a duplicate script.sh somewhere, 1 in your path and one not.
Code:
sudo find `pwd` / -name script.sh -type f
Change script.sh to actual script name.
 
Old 09-27-2012, 04:07 PM   #7
SecretCode
Member
 
Registered: Apr 2011
Location: UK
Distribution: Kubuntu 11.10
Posts: 562

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by SecretCode View Post
What editor are you using?
How are you calling the script?
You didn't answer these questions.

More details probably needed also for the "computer cluster" - what filesystem is it?

After saving, does ls or stat see an updated timestamp immediately?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
test26.s doesn't recognise DVD drive, other kernels won't recognise HDD v@ny@ Slackware - Installation 15 05-31-2007 06:03 AM
System doesn't recognise hungarian letters pusrob Debian 2 06-21-2006 02:10 AM
RH 4 Doesn't recognise The Tape Drive clark_john1 Linux - Hardware 0 07-28-2005 07:25 AM
Kernel 2.4.20-20.9 doesn't recognise new hardware? robertmarkbram Red Hat 0 11-20-2003 11:45 PM
mplayer doesn't recognise sound card. vexer Linux - Software 3 08-16-2003 12:22 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration