🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #224

Re: Back To CS Basics. Fuck AI

#224
From: Carlos E.R.
Date: Tue, 20 Oct 2026 08:54
59 lines
3606 bytes
On 2026-10-19 22:18, Anton Antimo wrote:
> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
> 
>> On 2026-10-17 22:47, Lawrence D’Oliveiro wrote:
>>> On 17 Oct 2026 08:40:24 GMT, Stéphane CARPENTIER wrote:
>>>
>>>> Now, there are almost no more interpreted scripts.
>>>
>>> Shell scripts are still interpreted. Not only that, but the shell
>>> actually seeks through the source file to do a transfer of control.
>>> How do I know this? Try making changes to the script while it is
>>> running. ;)
>>
>> I've just done this ("a script change while it's running") [*]
>> (with ksh and bash) and there was no change in behavior of the
>> running script.
>>
>> You may want to provide an example what you've actually done
>> to come to that conclusion (or reformulate your conclusion).
>>
>> BTW; I've in other (more complex?) contexts observed that some
>> intrusions (tackling the shell program while it runs) do affect
>> the running script, but back then I haven't examined the reason
>> or circumstances of that effect, or whether it's some effect of
>> an interaction with the OS. - So the principle question, what
>> exactly happens in what circumstances, is still interesting.
>>
>> Janis
>>
>> [*] What I've done was to run the following script "dynchg.sh"
>>
>>    while read ; do
>>        echo $REPLY
>>    done
>>
>> and change it (from another terminal) while it runs by
>>
>>    sed -i '2p' dynchg.sh
>>
>> I could even remove that file from the directory and it still
>> processes data as expected. And there's also no difference if
>> that program is explicitly run with the interpreter or running
>> it using a shebang interpreter as executable script.
> 
> If your remove the script while it's still running, chances are the
> interpreter still has it open, so the data is not removed until the file
> is closed---that is, you don't more free space until every reader and
> writer have closed the file.  That's the typical UNIX semantics of open
> files.  (If I understood the problem here correctly.)

I have learned not to edit a script while it was running, weird things 
happened when I did. My theory was that bash kept an index pointing to 
the current line. Dunno if as byte or as line.



-- 
Cheers, Carlos.
ES🇪🇸, EU🇪🇺;
Technical Details
Message-ID: <1rmjqmx0ds.ln2@Telcontar.valinor>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news-fra.pugleaf.net!news.tcpreset.net!newsgate.tebibyte.org!.POSTED.48.red-79-150-116.dynamicip.rima-tde.net!Telcontar.valinor!not-for-mail
References: <18dee4b6cab427fa$865$2574533$802601b3@news.usenetexpress.com> <POycnb0WPpTmPEz3nZ2dnZfqn_ednZ2d@giganews.com> <87ik32455m.fsf@solcaium.us> <6ad33478$0$28048$426a74cc@news.free.fr> <11b0ms8$iems$8@dont-email.me> <11b0pbe$3pvda$2@dont-email.me> <871p9lv3z2.fsf@safunu.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news-fra.pugleaf.net!news.tcpreset.net!newsgate.tebibyte.org!.POSTED.48.red-79-150-116.dynamicip.rima-tde.net!Telcontar.valinor!not-for-mail
From: "Carlos E.R." <robin_listas@es.invalid>
Newsgroups: comp.unix.shell
Subject: Re: Back To CS Basics. Fuck AI
Date: Tue, 20 Oct 2026 10:54:25 +0200
Organization: Tebibyte_Retro_Gaming
Message-ID: <1rmjqmx0ds.ln2@Telcontar.valinor>
References: <18dee4b6cab427fa$865$2574533$802601b3@news.usenetexpress.com>
 <POycnb0WPpTmPEz3nZ2dnZfqn_ednZ2d@giganews.com> <87ik32455m.fsf@solcaium.us>
 <6ad33478$0$28048$426a74cc@news.free.fr> <11b0ms8$iems$8@dont-email.me>
 <11b0pbe$3pvda$2@dont-email.me> <871p9lv3z2.fsf@safunu.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: mailgate.tebibyte.org; posting-host="48.red-79-150-116.dynamicip.rima-tde.net:79.150.116.48";
	logging-data="9002"; mail-complaints-to="abuse@tebibyte.org"
User-Agent: Mozilla Thunderbird
Content-Language: es-ES, en-CA
In-Reply-To: <871p9lv3z2.fsf@safunu.org>
X-Leafnode-NNTP-Posting-Host: 127.0.0.1