Way back in my Windows days, I found out that editing a running network based batch file 'raised the dickens' with the machine running it. Apparent was that Windows read, then executed, a line at a time.
Is the same true of linux (CentOS) scripts? Or, are they read into memory in their entirety and executed from there? I ask because I have a machine currently running a shared backup script which has 'spit out' an error to it's log file, and I want to edit the scripts to fix my screw-up before I forget about it yet again. Can I safely edit the script while a machine is running it, or must I wait till it's done?
Thank you
[Solved] script question - theory
-
- Posts: 1522
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
[Solved] script question - theory
Last edited by lightman47 on 2019/02/12 20:13:59, edited 1 time in total.
Re: script question - theory
Move the old script to a new name. As long as the process has the file open, it will continue reading that file regardless of the name change.
Then create a new copy of the file with the original name and make your edits. That file will then be used the next time.
Then create a new copy of the file with the original name and make your edits. That file will then be used the next time.
-
- Posts: 1522
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
Re: script question - theory
Wow - thank you!