<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: modifying a shell script while it is running in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/modifying-a-shell-script-while-it-is-running/m-p/3495211#M844656</link>
    <description>Shell scripts are interpreted, not compiled so simple scripts are read one line at a time. For small scripts, most of it is probably in the buffer cache and in thye shell's buffers. Given a really long script (several pages long) and certain changes, the shell could get very mixed up on where it is within the script and the shell will certainly crash. It isn't easy to predict which scripts and what changes will cause a shell to crash. I hope this is an academic question and not an attempt to modify production code on the fly...</description>
    <pubDate>Tue, 01 Mar 2005 13:52:17 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2005-03-01T13:52:17Z</dc:date>
    <item>
      <title>modifying a shell script while it is running</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/modifying-a-shell-script-while-it-is-running/m-p/3495207#M844652</link>
      <description>HPUX 11.0&lt;BR /&gt;bash shell&lt;BR /&gt;&lt;BR /&gt;If I modify a shell script (add/delete lines, comment out lines) while it is executing will it abort. It seems to me that I have seen scripts abort in the past.&lt;BR /&gt;&lt;BR /&gt;Any input would be appreciated.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Marc Bohnert&lt;BR /&gt;MedPlus</description>
      <pubDate>Tue, 01 Mar 2005 10:35:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/modifying-a-shell-script-while-it-is-running/m-p/3495207#M844652</guid>
      <dc:creator>Marc Bohnert</dc:creator>
      <dc:date>2005-03-01T10:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: modifying a shell script while it is running</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/modifying-a-shell-script-while-it-is-running/m-p/3495208#M844653</link>
      <description>I've certaiunly seen scripts get very upset if you edit them whilst they are running. It's not generally a good idea.</description>
      <pubDate>Tue, 01 Mar 2005 10:41:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/modifying-a-shell-script-while-it-is-running/m-p/3495208#M844653</guid>
      <dc:creator>Stephen Keane</dc:creator>
      <dc:date>2005-03-01T10:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: modifying a shell script while it is running</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/modifying-a-shell-script-while-it-is-running/m-p/3495209#M844654</link>
      <description>It will not abort when asked as stated. Once read in and parsed, the file could even be removed and the script would continue to execute. However, if you edit a script that is called from another script then you could have problems because that script is read each time so if you introduced a syntax error into the called script. The next time the script is called (e.g. in a loop) a failure would occur.</description>
      <pubDate>Tue, 01 Mar 2005 10:42:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/modifying-a-shell-script-while-it-is-running/m-p/3495209#M844654</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-03-01T10:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: modifying a shell script while it is running</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/modifying-a-shell-script-while-it-is-running/m-p/3495210#M844655</link>
      <description>Yeah, what Clay said. I've frequently modified scripts while running without problems. As long as they're not called-scripts, you should be safe. When testing scripts, I usually have 2 windows opened up. Running the script in one, editing it in the other.</description>
      <pubDate>Tue, 01 Mar 2005 13:14:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/modifying-a-shell-script-while-it-is-running/m-p/3495210#M844655</guid>
      <dc:creator>S.Rider</dc:creator>
      <dc:date>2005-03-01T13:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: modifying a shell script while it is running</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/modifying-a-shell-script-while-it-is-running/m-p/3495211#M844656</link>
      <description>Shell scripts are interpreted, not compiled so simple scripts are read one line at a time. For small scripts, most of it is probably in the buffer cache and in thye shell's buffers. Given a really long script (several pages long) and certain changes, the shell could get very mixed up on where it is within the script and the shell will certainly crash. It isn't easy to predict which scripts and what changes will cause a shell to crash. I hope this is an academic question and not an attempt to modify production code on the fly...</description>
      <pubDate>Tue, 01 Mar 2005 13:52:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/modifying-a-shell-script-while-it-is-running/m-p/3495211#M844656</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2005-03-01T13:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: modifying a shell script while it is running</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/modifying-a-shell-script-while-it-is-running/m-p/3495212#M844657</link>
      <description>For smaller scripts, the script would be entirely in&lt;BR /&gt;the system memory; so any change in the script&lt;BR /&gt;by another process, however bad idea it may be,&lt;BR /&gt;will have no affect or the currently running program.&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Mar 2005 14:33:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/modifying-a-shell-script-while-it-is-running/m-p/3495212#M844657</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-03-01T14:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: modifying a shell script while it is running</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/modifying-a-shell-script-while-it-is-running/m-p/3495213#M844658</link>
      <description>An addition to my previous post. &lt;BR /&gt;&lt;BR /&gt;A running script is always entirely loaded into the &lt;BR /&gt;memory irrespective of the script size, so any change &lt;BR /&gt;to the script while it's running will have no affect on the&lt;BR /&gt;running process. Ofcourse, if the script is too big and&lt;BR /&gt;can't be loaded into the memory entirely, the invoking&lt;BR /&gt;shell will get SIGSEGV (insufficient memory/swap &lt;BR /&gt;space) and abort.&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Tue, 01 Mar 2005 14:55:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/modifying-a-shell-script-while-it-is-running/m-p/3495213#M844658</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-03-01T14:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: modifying a shell script while it is running</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/modifying-a-shell-script-while-it-is-running/m-p/3495214#M844659</link>
      <description>Dear Marc,&lt;BR /&gt;&lt;BR /&gt;From my 22 years experience (csh, ksh, HP-UX posix shell, bash), I have found that shell scripts can do strange things even if I make a really small change and then save the script while it is running.&lt;BR /&gt;&lt;BR /&gt;So if you want to be on the safe side, never save a modified script while it is running. It is safer to:&lt;BR /&gt;1. Copy the script and edit the copy&lt;BR /&gt;2. - or - save it under a different name&lt;BR /&gt;3. - or - wait until the script completes before saving your changes to disk&lt;BR /&gt;&lt;BR /&gt;Kind regards, Christian</description>
      <pubDate>Tue, 05 Apr 2005 07:48:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/modifying-a-shell-script-while-it-is-running/m-p/3495214#M844659</guid>
      <dc:creator>Christian Deutsch_1</dc:creator>
      <dc:date>2005-04-05T07:48:52Z</dc:date>
    </item>
  </channel>
</rss>

