Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Don't tell me how hard you work. Tell me how much you get done. -- James J. Ling


computers / alt.os.linux / bash - executing "history" commands - inconsistent results

SubjectAuthor
* bash - executing "history" commands - inconsistent resultsR.Wieser
`* bash - executing "history" commands - inconsistent resultsDan Purgert
 `* bash - executing "history" commands - inconsistent resultsR.Wieser
  +* bash - executing "history" commands - inconsistent resultsDan Purgert
  |+* bash - executing "history" commands - inconsistent resultsCarlos E.R.
  ||+- bash - executing "history" commands - inconsistent resultsDan Purgert
  ||`* bash - executing "history" commands - inconsistent resultsR.Wieser
  || `* bash - executing "history" commands - inconsistent resultsR.Wieser
  ||  `* bash - executing "history" commands - inconsistent resultsCarlos E.R.
  ||   `* bash - executing "history" commands - inconsistent resultsR.Wieser
  ||    `- bash - executing "history" commands - inconsistent resultsCarlos E.R.
  |+- bash - executing "history" commands - inconsistent resultsR.Wieser
  |`- bash - executing "history" commands - inconsistent resultsR.Wieser
  `* bash - executing "history" commands - inconsistent resultsCarlos E.R.
   `* bash - executing "history" commands - inconsistent resultsRonB
    +* bash - executing "history" commands - inconsistent resultsChris Elvidge
    |+- bash - executing "history" commands - inconsistent resultsRonB
    |`* bash - executing "history" commands - inconsistent resultsPeter 'Shaggy' Haywood
    | `- bash - executing "history" commands - inconsistent resultsRonB
    +- bash - executing "history" commands - inconsistent resultsChris Elvidge
    +* bash - executing "history" commands - inconsistent resultsCarlos E.R.
    |`- bash - executing "history" commands - inconsistent resultsRonB
    +* bash - executing "history" commands - inconsistent resultsR.Wieser
    |`* bash - executing "history" commands - inconsistent resultsRonB
    | `* bash - executing "history" commands - inconsistent resultsR.Wieser
    |  `- bash - executing "history" commands - inconsistent resultsRonB
    `* bash - executing "history" commands - inconsistent resultsDan Purgert
     `- bash - executing "history" commands - inconsistent resultsR.Wieser

Pages:12
Re: bash - executing "history" commands - inconsistent results

<2diaijxh7j.ln2@Telcontar.valinor>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1225&group=alt.os.linux#1225

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E.R.)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Wed, 3 May 2023 19:31:46 +0200
Lines: 14
Message-ID: <2diaijxh7j.ln2@Telcontar.valinor>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net>
<u2tboj$1875h$1@dont-email.me> <slrnu54du4.t5.dan@djph.net>
<gaq9ijx49l.ln2@Telcontar.valinor> <u2tgdg$18tct$2@dont-email.me>
<u2u0dh$1bdda$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net KZiNtkTOpQ4z3womsz0pZgdNWfI3RnlsyVxG9otCgclY/ejSDZ
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:TnjqzTsFdngFpQeDf6CYmMFCdmE=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Content-Language: es-ES, en-CA
In-Reply-To: <u2u0dh$1bdda$1@dont-email.me>
 by: Carlos E.R. - Wed, 3 May 2023 17:31 UTC

On 2023-05-03 17:59, R.Wieser wrote:
> Carlos,
>
>>> But the function was named "cleanist()", then he calls "cleanhist".
>>
>> The first is its declaration, the second how its called.
>
> I only just now noticed the typo, that the first one misses a "h". sorry.

So, is it working now?

--
Cheers, Carlos.

Re: bash - executing "history" commands - inconsistent results

<u2vidn$1ng25$3@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1232&group=alt.os.linux#1232

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: address@is.invalid (R.Wieser)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Thu, 4 May 2023 08:11:33 +0200
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <u2vidn$1ng25$3@dont-email.me>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net> <u2tboj$1875h$1@dont-email.me> <slrnu54du4.t5.dan@djph.net> <gaq9ijx49l.ln2@Telcontar.valinor> <u2tgdg$18tct$2@dont-email.me> <u2u0dh$1bdda$1@dont-email.me> <2diaijxh7j.ln2@Telcontar.valinor>
Injection-Date: Thu, 4 May 2023 06:13:11 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9fb23d94031051545fc73a55443d082b";
logging-data="1818693"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/hHIqdIZwdrOkJ5YlIHi1eq8yTQAOCotSYEsqrPxKPpw=="
Cancel-Lock: sha1:Ex3DUsG1iYUtKxEp4jecpqEAJvE=
X-RFC2646: Format=Flowed; Response
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-MSMail-Priority: Normal
 by: R.Wieser - Thu, 4 May 2023 06:11 UTC

Carlos,

>> I only just now noticed the typo, that the first one misses a "h".
>> sorry.
>
> So, is it working now?

No. The typo was in the message, not my script.

Besides, if it would have been in my code I would have had a 'command
doesn't exist' error message - which is unlikely I would have missed it. :-)

In the mean time I've tried to figure out what is happening, and think I
know how, but not why or how to solve it : when I, in the preloaded
function, remove the "history -c" line the "history -s foobar" does indeed
add "foobar" to the history. As such I get the strong feeling that, in the
preloaded function, the clearing of the history is delayed, and only applied
after the "foobar" is added - making it /look like/ that never happened.

By the way, I did add an "echo {something}" to the top and bottom of the
script, just so I could make sure the script runs and does not exit
prematurily. Both messages where shown.

The remaining/new question is : How can I force the preloaded script to
actually execute the "history -c" line before continuing to the next line

Regards,
Rudy Wieser

Re: bash - executing "history" commands - inconsistent results

<u30i6p$1si24$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1235&group=alt.os.linux#1235

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ronb02NOSPAM@gmail.com (RonB)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Thu, 4 May 2023 15:15:38 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <u30i6p$1si24$1@dont-email.me>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net>
<u2tboj$1875h$1@dont-email.me> <0kp9ijx8qr.ln2@Telcontar.valinor>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 4 May 2023 15:15:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="822afb222efed0b66a832292d6452e48";
logging-data="1984580"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18k12U8Y082Bl/Pet+9y+wA"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:GHCqApzltxpB5iXWATSb+lfK/kc=
 by: RonB - Thu, 4 May 2023 15:15 UTC

On 2023-05-03, Carlos E.R. <robin_listas@es.invalid> wrote:
> On 2023-05-03 12:06, R.Wieser wrote:
>> Dan,
>>
>>> What do you mean "preload" ?
>>
>> executing the script
>>
>> . ./loadit
>
> This is not "executing". This is "sourcing (script) loadit".

Just curious. What's the difference? I have scripts that load applications
from the command line and then close the terminal. I found the only way I
could do that is use the period (. source).

For example this script changes the directory, calls another script (lst) to
list files, waits till I enter file name, runs Emacs in full height and adds
the .fountain extension and then exits the terminal.

#!/bin/bash
cd ~/Documents/scripts
lst lfount
read -p 'file: ' uservar
em $uservar &
exit

If I just run it, it doesn't exit the terminal, but if I source it, it does.
I know it works, but I don't know why. Or maybe I do — waiting for me to
exit Emacs before exiting the terminal?

--
"Evil preaches tolerance until it is dominant, then it tries to silence good."
-- Archbishop Charles J. Chaput

Re: bash - executing "history" commands - inconsistent results

<u30ipm$1sjoh$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1236&group=alt.os.linux#1236

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris@mshome.net (Chris Elvidge)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Thu, 4 May 2023 16:25:42 +0100
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <u30ipm$1sjoh$1@dont-email.me>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net>
<u2tboj$1875h$1@dont-email.me> <0kp9ijx8qr.ln2@Telcontar.valinor>
<u30i6p$1si24$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 4 May 2023 15:25:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2c188611c25684974cf0f559df17124d";
logging-data="1986321"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+OAgijqwShLlqrDTgtkNi+YYOE9GAbtF4="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.2.1 Lightning/5.4
Cancel-Lock: sha1:wUYQ5fNpMrLgLh2JMU0LuArBekw=
Content-Language: en-GB
In-Reply-To: <u30i6p$1si24$1@dont-email.me>
 by: Chris Elvidge - Thu, 4 May 2023 15:25 UTC

On 04/05/2023 16:15, RonB wrote:
> On 2023-05-03, Carlos E.R. <robin_listas@es.invalid> wrote:
>> On 2023-05-03 12:06, R.Wieser wrote:
>>> Dan,
>>>
>>>> What do you mean "preload" ?
>>>
>>> executing the script
>>>
>>> . ./loadit
>>
>> This is not "executing". This is "sourcing (script) loadit".
>
> Just curious. What's the difference? I have scripts that load applications
> from the command line and then close the terminal. I found the only way I
> could do that is use the period (. source).
>
> For example this script changes the directory, calls another script (lst) to
> list files, waits till I enter file name, runs Emacs in full height and adds
> the .fountain extension and then exits the terminal.
>
> #!/bin/bash
> cd ~/Documents/scripts
> lst lfount
> read -p 'file: ' uservar
> em $uservar &
> exit
>
> If I just run it, it doesn't exit the terminal, but if I source it, it does.
> I know it works, but I don't know why. Or maybe I do — waiting for me to
> exit Emacs before exiting the terminal?
>

Remove the `exit` line?

--
Chris Elvidge
England

Re: bash - executing "history" commands - inconsistent results

<u30j9o$1snvi$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1237&group=alt.os.linux#1237

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: chris@mshome.net (Chris Elvidge)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Thu, 4 May 2023 16:34:15 +0100
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <u30j9o$1snvi$1@dont-email.me>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net>
<u2tboj$1875h$1@dont-email.me> <0kp9ijx8qr.ln2@Telcontar.valinor>
<u30i6p$1si24$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 4 May 2023 15:34:16 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2c188611c25684974cf0f559df17124d";
logging-data="1990642"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/vMDyY9GjcsLR79/Vqa/RM7c6FQiKMMdk="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101
Thunderbird/52.2.1 Lightning/5.4
Cancel-Lock: sha1:0wjrP4dL0I3N4CNBH1mH2mA/xec=
In-Reply-To: <u30i6p$1si24$1@dont-email.me>
Content-Language: en-GB
 by: Chris Elvidge - Thu, 4 May 2023 15:34 UTC

On 04/05/2023 16:15, RonB wrote:
> On 2023-05-03, Carlos E.R. <robin_listas@es.invalid> wrote:
>> On 2023-05-03 12:06, R.Wieser wrote:
>>> Dan,
>>>
>>>> What do you mean "preload" ?
>>>
>>> executing the script
>>>
>>> . ./loadit
>>
>> This is not "executing". This is "sourcing (script) loadit".
>
> Just curious. What's the difference? I have scripts that load applications
> from the command line and then close the terminal. I found the only way I
> could do that is use the period (. source).
>
> For example this script changes the directory, calls another script (lst) to
> list files, waits till I enter file name, runs Emacs in full height and adds
> the .fountain extension and then exits the terminal.
>
> #!/bin/bash
> cd ~/Documents/scripts
> lst lfount
> read -p 'file: ' uservar
> em $uservar &
> exit
>
> If I just run it, it doesn't exit the terminal, but if I source it, it does.
> I know it works, but I don't know why. Or maybe I do — waiting for me to
> exit Emacs before exiting the terminal?
>

And you probably don't need the ampersand.

--
Chris Elvidge
England

Re: bash - executing "history" commands - inconsistent results

<7u7dijxf3f.ln2@Telcontar.valinor>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1238&group=alt.os.linux#1238

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E.R.)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Thu, 4 May 2023 19:51:35 +0200
Lines: 41
Message-ID: <7u7dijxf3f.ln2@Telcontar.valinor>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net>
<u2tboj$1875h$1@dont-email.me> <0kp9ijx8qr.ln2@Telcontar.valinor>
<u30i6p$1si24$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: individual.net yk8ae13nmYxGNvlRD4w0qwK9FGXGjRZ9ESaN667cQ9uCWkZ+eC
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:i7xsxD1dVb2aVCk/G5Z7/N3+Efw=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Content-Language: es-ES, en-CA
In-Reply-To: <u30i6p$1si24$1@dont-email.me>
 by: Carlos E.R. - Thu, 4 May 2023 17:51 UTC

On 2023-05-04 17:15, RonB wrote:
> On 2023-05-03, Carlos E.R. <robin_listas@es.invalid> wrote:
>> On 2023-05-03 12:06, R.Wieser wrote:
>>> Dan,
>>>
>>>> What do you mean "preload" ?
>>>
>>> executing the script
>>>
>>> . ./loadit
>>
>> This is not "executing". This is "sourcing (script) loadit".
>
> Just curious. What's the difference? I have scripts that load applications
> from the command line and then close the terminal. I found the only way I
> could do that is use the period (. source).

Sourcing is used to create variables that are written in the second
script without running it.

>
> For example this script changes the directory, calls another script (lst) to
> list files, waits till I enter file name, runs Emacs in full height and adds
> the .fountain extension and then exits the terminal.
>
> #!/bin/bash
> cd ~/Documents/scripts
> lst lfount
> read -p 'file: ' uservar
> em $uservar &
> exit
>
> If I just run it, it doesn't exit the terminal, but if I source it, it does.
> I know it works, but I don't know why. Or maybe I do — waiting for me to
> exit Emacs before exiting the terminal?

Yes, I think so.

--
Cheers, Carlos.

Re: bash - executing "history" commands - inconsistent results

<v18dijxf3f.ln2@Telcontar.valinor>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1239&group=alt.os.linux#1239

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E.R.)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Thu, 4 May 2023 19:53:35 +0200
Lines: 35
Message-ID: <v18dijxf3f.ln2@Telcontar.valinor>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net>
<u2tboj$1875h$1@dont-email.me> <slrnu54du4.t5.dan@djph.net>
<gaq9ijx49l.ln2@Telcontar.valinor> <u2tgdg$18tct$2@dont-email.me>
<u2u0dh$1bdda$1@dont-email.me> <2diaijxh7j.ln2@Telcontar.valinor>
<u2vidn$1ng25$3@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net HjGwhLBuROKvXAwiSKWEowWO4YEmv2eW9dSqN2qGxKsT213tJw
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:/dZKbqFXDWnwJAHTQ6PUwbMrXlc=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Content-Language: es-ES, en-CA
In-Reply-To: <u2vidn$1ng25$3@dont-email.me>
 by: Carlos E.R. - Thu, 4 May 2023 17:53 UTC

On 2023-05-04 08:11, R.Wieser wrote:
> Carlos,
>
>>> I only just now noticed the typo, that the first one misses a "h".
>>> sorry.
>>
>> So, is it working now?
>
> No. The typo was in the message, not my script.
>
> Besides, if it would have been in my code I would have had a 'command
> doesn't exist' error message - which is unlikely I would have missed it. :-)

No if you had defined both, each with a different code.

> In the mean time I've tried to figure out what is happening, and think I
> know how, but not why or how to solve it : when I, in the preloaded
> function, remove the "history -c" line the "history -s foobar" does indeed
> add "foobar" to the history. As such I get the strong feeling that, in the
> preloaded function, the clearing of the history is delayed, and only applied
> after the "foobar" is added - making it /look like/ that never happened.
>
> By the way, I did add an "echo {something}" to the top and bottom of the
> script, just so I could make sure the script runs and does not exit
> prematurily. Both messages where shown.
>
> The remaining/new question is : How can I force the preloaded script to
> actually execute the "history -c" line before continuing to the next line

I have never run experiments like that, so I don't know.

--
Cheers, Carlos.

Re: bash - executing "history" commands - inconsistent results

<u311d6$1v2am$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1240&group=alt.os.linux#1240

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: address@is.invalid (R.Wieser)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Thu, 4 May 2023 21:34:43 +0200
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <u311d6$1v2am$1@dont-email.me>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net> <u2tboj$1875h$1@dont-email.me> <0kp9ijx8qr.ln2@Telcontar.valinor> <u30i6p$1si24$1@dont-email.me>
Injection-Date: Thu, 4 May 2023 19:35:02 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="9fb23d94031051545fc73a55443d082b";
logging-data="2066774"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX183GYVB3OWvkqraloUVNZgKE2MRA3ufdnxU4Db2d++6ZA=="
Cancel-Lock: sha1:xGbLxs8ooe4+ocISAxYZn0UzggI=
X-RFC2646: Format=Flowed; Original
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Priority: 3
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
 by: R.Wieser - Thu, 4 May 2023 19:34 UTC

RonB,

>>> executing the script
>>>
>>> . ./loadit
>>
>> This is not "executing". This is "sourcing (script) loadit".
>
> Just curious. What's the difference?

The "difference" is that "sourcing" is a shorthand for executing the script
in the parents environment(meaning : it can alter/create environment
variables of that parent).

IOW, no difference in regard to the execute part, but only in which
environment it uses.

> If I just run it, it doesn't exit the terminal, but if I source it, it
> does.

That is because if you "just run it": bash is spawned (with a copy oif its
parent environment!), and the exit just terminates the spawned bash (and
tthrows its environment away - inclusive any changes you might have made to
it).

On the other hand, if you "source" it (or run it "dotted" - same thing) than
you exit the parent. And as that parent is the top level program in your
terminal that terminal program hasn't anything to run anymore, and thus it
also exits.

Regards,
Rudy Wieser

Re: bash - executing "history" commands - inconsistent results

<slrnu59s1h.t5.dan@djph.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1241&group=alt.os.linux#1241

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dan@djph.net (Dan Purgert)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Fri, 5 May 2023 12:00:50 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 110
Message-ID: <slrnu59s1h.t5.dan@djph.net>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net>
<u2tboj$1875h$1@dont-email.me> <0kp9ijx8qr.ln2@Telcontar.valinor>
<u30i6p$1si24$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 5 May 2023 12:00:50 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ce58bc66ad88f9e1bd51e9f4d0725b7a";
logging-data="2471092"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19v/sQnUAe7GiEdfsjhRp4W5RDvjqc0y0U="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:2XukDcsQZbmvK5gSBmxSn1nNLDE=
 by: Dan Purgert - Fri, 5 May 2023 12:00 UTC

On 2023-05-04, RonB wrote:
> On 2023-05-03, Carlos E.R. <robin_listas@es.invalid> wrote:
>> On 2023-05-03 12:06, R.Wieser wrote:
>>> Dan,
>>>
>>>> What do you mean "preload" ?
>>>
>>> executing the script
>>>
>>> . ./loadit
>>
>> This is not "executing". This is "sourcing (script) loadit".
>
> Just curious. What's the difference? I have scripts that load
> applications from the command line and then close the terminal. I
> found the only way I could do that is use the period (. source).

Executing is "run this now".
Sourcing is "read the named file, and insert its contents right here."

Think of it like this -- you've got two files that are related in some
manner (I dunno, a report and a corresponding graph / picture / etc that
needs to be on Page 17 of N)

"Executing" the two files would be printing them both out, and then
manually flipping through the report text until you've gotten to the
right page, then manually inserting the picture (etc.) before stapling
it.

However, "sourcing" the picture into the report would be akin to using
"Insert -> Object ..." and selecting the appropriate *png (etc.). Then
at printing time, the computer simply opens the correct "external file"
and slips it right in for you. (And now you can use the "fancy" printer
that auto-staples each report as it comes out).

>
> For example this script changes the directory, calls another script
> (lst) to list files, waits till I enter file name, runs Emacs in full
> height and adds the .fountain extension and then exits the terminal.
>
> #!/bin/bash
> cd ~/Documents/scripts
> lst lfount
> read -p 'file: ' uservar
> em $uservar &
> exit
>
> If I just run it, it doesn't exit the terminal, but if I source it, it
> does.
> I know it works, but I don't know why. Or maybe I do — waiting for me to
> exit Emacs before exiting the terminal?

If you run it from an interactive shell (TTY1-N or xterm (etc.)) --

(1) Open Terminal
(2) $ ./RonsScript

Your main shell process will spawn a subshell to run "RonsScript".

The execution flow is:

(0) User Open xterm (etc.)
(1) Shell -- "please tell me what to do"
(2) User -- "run RonsScript"
(3) Shell -- Create child process ("Bash.1")
(4) Shell.1 -- cd ... launch emacs
(5) User -- [interact with emacs], close emacs
(6) Shell.1 -- exit (return control to Bash)
(7) Shell -- "please tell me what to do"

If the shell didn't do this, then basically every script or program
would log us out (if using TTY1-N), or close our chosen terminal
application (xterm (etc.)) when 'exit' was called (such as
exiting with an error code). I don't know about you, but that would
seriously annoy me :)

On the other hand, sourcing it will slap it right into the main shell's
process flow, such that it doesn't believe it needs a subshell. In this
case, the execution flow is:

(1) Shell -- "please tell me what to do"
(2) User -- "add this function defined in RonsScript to your execution
flow"
(3) Shell -- cd ... launch emacs
(4) User -- [interact with emacs], close emacs
(5) Shell -- exit (logout TTY1-N / close xterm)

If you wanted an interactive shell to behave similarly WITHOUT sourcing
the script first, then you'd do things like this:

(1) Open Terminal
(2) $ ./RonsScript ; exit

In this case, the execution flow would be identical to the first one
above, with the additional steps (noting of course that the semicolon
acts as an automatic "okay, now immediately do this" command to the
shell, and preempts the user from seeing the prompt in step 7):

(8) User -- "Please close"
(9) Shell -- exit (logout TTY1-N / close xterm)

Note that in this case, the 'exit' in the script is entirely
superfluous, as the subshell would exit anyway once RonsScript reaches
EOF.

--
|_|O|_|
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860

Re: bash - executing "history" commands - inconsistent results

<u332l8$2clhh$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1242&group=alt.os.linux#1242

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: address@is.invalid (R.Wieser)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Fri, 5 May 2023 16:08:13 +0200
Organization: A noiseless patient Spider
Lines: 71
Message-ID: <u332l8$2clhh$1@dont-email.me>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net> <u2tboj$1875h$1@dont-email.me> <0kp9ijx8qr.ln2@Telcontar.valinor> <u30i6p$1si24$1@dont-email.me> <slrnu59s1h.t5.dan@djph.net>
Injection-Date: Fri, 5 May 2023 14:08:40 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c350eb0bf5b606d416d11ce14b0c9624";
logging-data="2512433"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18jUpoBiucM4IATXy8AoKQ5bUQY/Ll7k9J/I6tk1AKV8w=="
Cancel-Lock: sha1:Qmq0A4Jstb92zWRbigg/rTWlNzc=
X-RFC2646: Format=Flowed; Original
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Priority: 3
 by: R.Wieser - Fri, 5 May 2023 14:08 UTC

Dan,

> Executing is "run this now".
> Sourcing is "read the named file, and insert its contents right here."

You will need to explain that part "insert its contents right here" a bit
more in-depth I'm afraid.

AFAIK /both/ execute the contents of the file. The result depends on whats
in it.

> However, "sourcing" the picture into the report would be akin to using
> "Insert -> Object ..."

No, thats not the same.

Example:

File test1
- - - - - - - - - - - - - - -
echo "hello world"
- - - - - - - - - - - - - - -
either just execute the file ("./test1") or source it ("source test1" or ".
../test1") and the text "hello world" will be displayed.

What you are describing is using a file which contains a function.

File test2
- - - - - - - - - - - - - - -
test3() {
echo "hello world"
} test3
- - - - - - - - - - - - - - -

Execute or source it, and both again will display "hello world"

So, whats the difference ?

The difference is that an "executed" script is run in its own, spawned bash
process - which means that all the changes to its environment are thrown
away when that spawned bash process is terminated when the script ends.

But when the script is "sourced" (or run "dotted", same thing) there is no
bash process spawned, and the script runs in the environment of the current
bash process.

What that means ? It means that the "test3" function isn't discarded, and
can again be called after the script terminates. Just type "test3" <enter>
(the same as the last line in the "test2" script).

It also means that when in the "sourced" test1 script an "env" variable is
changed/created/deleted that that change will "stick".

Having said that, most people just "source" scripts to add a function like
"test3" to the current environment (and won't, directly after declaring it,
run it like I did in the "test2" script).

-- List all current "sourced" scripts:
$ declare -F

-- List the contents of a specific script from
$ declare -f {scriptname}

-- Delete a "sourced" script
$ unset -f {scriptname}

Regards,
Rudy Wieser

Re: bash - executing "history" commands - inconsistent results

<u3419q$2h4q1$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1243&group=alt.os.linux#1243

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ronb02NOSPAM@gmail.com (RonB)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Fri, 5 May 2023 22:51:38 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 41
Message-ID: <u3419q$2h4q1$1@dont-email.me>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net>
<u2tboj$1875h$1@dont-email.me> <0kp9ijx8qr.ln2@Telcontar.valinor>
<u30i6p$1si24$1@dont-email.me> <u30ipm$1sjoh$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 5 May 2023 22:51:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5afca6f783491f5cadad08cea318e09a";
logging-data="2659137"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+CtchRQ0vf8LMTxVsHqe8C"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:2acHpiGTP/YG7+CVsQXIyzfJ9Do=
 by: RonB - Fri, 5 May 2023 22:51 UTC

On 2023-05-04, Chris Elvidge <chris@mshome.net> wrote:
> On 04/05/2023 16:15, RonB wrote:
>> On 2023-05-03, Carlos E.R. <robin_listas@es.invalid> wrote:
>>> On 2023-05-03 12:06, R.Wieser wrote:
>>>> Dan,
>>>>
>>>>> What do you mean "preload" ?
>>>>
>>>> executing the script
>>>>
>>>> . ./loadit
>>>
>>> This is not "executing". This is "sourcing (script) loadit".
>>
>> Just curious. What's the difference? I have scripts that load applications
>> from the command line and then close the terminal. I found the only way I
>> could do that is use the period (. source).
>>
>> For example this script changes the directory, calls another script (lst) to
>> list files, waits till I enter file name, runs Emacs in full height and adds
>> the .fountain extension and then exits the terminal.
>>
>> #!/bin/bash
>> cd ~/Documents/scripts
>> lst lfount
>> read -p 'file: ' uservar
>> em $uservar &
>> exit
>>
>> If I just run it, it doesn't exit the terminal, but if I source it, it does.
>> I know it works, but I don't know why. Or maybe I do — waiting for me to
>> exit Emacs before exiting the terminal?
>>
>
> Remove the `exit` line?

Doesn't close the terminal. (With or without the ampersand.)

--
"Evil preaches tolerance until it is dominant, then it tries to silence good."
-- Archbishop Charles J. Chaput

Re: bash - executing "history" commands - inconsistent results

<u341ba$2h4q1$2@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1244&group=alt.os.linux#1244

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ronb02NOSPAM@gmail.com (RonB)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Fri, 5 May 2023 22:52:27 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 44
Message-ID: <u341ba$2h4q1$2@dont-email.me>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net>
<u2tboj$1875h$1@dont-email.me> <0kp9ijx8qr.ln2@Telcontar.valinor>
<u30i6p$1si24$1@dont-email.me> <7u7dijxf3f.ln2@Telcontar.valinor>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 5 May 2023 22:52:27 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5afca6f783491f5cadad08cea318e09a";
logging-data="2659137"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+YuHx4H3s3S20Lvp0fqK1T"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:OYpmIQUeGfqw1DmZd+fuKTMuYFA=
 by: RonB - Fri, 5 May 2023 22:52 UTC

On 2023-05-04, Carlos E.R. <robin_listas@es.invalid> wrote:
> On 2023-05-04 17:15, RonB wrote:
>> On 2023-05-03, Carlos E.R. <robin_listas@es.invalid> wrote:
>>> On 2023-05-03 12:06, R.Wieser wrote:
>>>> Dan,
>>>>
>>>>> What do you mean "preload" ?
>>>>
>>>> executing the script
>>>>
>>>> . ./loadit
>>>
>>> This is not "executing". This is "sourcing (script) loadit".
>>
>> Just curious. What's the difference? I have scripts that load applications
>> from the command line and then close the terminal. I found the only way I
>> could do that is use the period (. source).
>
> Sourcing is used to create variables that are written in the second
> script without running it.
>
>>
>> For example this script changes the directory, calls another script (lst) to
>> list files, waits till I enter file name, runs Emacs in full height and adds
>> the .fountain extension and then exits the terminal.
>>
>> #!/bin/bash
>> cd ~/Documents/scripts
>> lst lfount
>> read -p 'file: ' uservar
>> em $uservar &
>> exit
>>
>> If I just run it, it doesn't exit the terminal, but if I source it, it does.
>> I know it works, but I don't know why. Or maybe I do — waiting for me to
>> exit Emacs before exiting the terminal?
>
> Yes, I think so.

Okay, thanks for the information.

--
"Evil preaches tolerance until it is dominant, then it tries to silence good."
-- Archbishop Charles J. Chaput

Re: bash - executing "history" commands - inconsistent results

<u341hr$2h4q1$3@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1245&group=alt.os.linux#1245

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ronb02NOSPAM@gmail.com (RonB)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Fri, 5 May 2023 22:55:56 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <u341hr$2h4q1$3@dont-email.me>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net>
<u2tboj$1875h$1@dont-email.me> <0kp9ijx8qr.ln2@Telcontar.valinor>
<u30i6p$1si24$1@dont-email.me> <u311d6$1v2am$1@dont-email.me>
Injection-Date: Fri, 5 May 2023 22:55:56 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5afca6f783491f5cadad08cea318e09a";
logging-data="2659137"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/FG9SdkpgWuimseIhRvnPF"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:AG7UG1ywu2dsExFnOHeeFXxQthc=
 by: RonB - Fri, 5 May 2023 22:55 UTC

On 2023-05-04, R.Wieser <address@is.invalid> wrote:
> RonB,
>
>>>> executing the script
>>>>
>>>> . ./loadit
>>>
>>> This is not "executing". This is "sourcing (script) loadit".
>>
>> Just curious. What's the difference?
>
> The "difference" is that "sourcing" is a shorthand for executing the script
> in the parents environment(meaning : it can alter/create environment
> variables of that parent).
>
> IOW, no difference in regard to the execute part, but only in which
> environment it uses.
>
>> If I just run it, it doesn't exit the terminal, but if I source it, it
>> does.
>
> That is because if you "just run it": bash is spawned (with a copy oif its
> parent environment!), and the exit just terminates the spawned bash (and
> tthrows its environment away - inclusive any changes you might have made to
> it).
>
> On the other hand, if you "source" it (or run it "dotted" - same thing) than
> you exit the parent. And as that parent is the top level program in your
> terminal that terminal program hasn't anything to run anymore, and thus it
> also exits.
>
> Regards,
> Rudy Wieser

Thanks for the explanation. Not completely clear on the spawning and
environment, but it gives me something to look up.

--
"Evil preaches tolerance until it is dominant, then it tries to silence good."
-- Archbishop Charles J. Chaput

Re: bash - executing "history" commands - inconsistent results

<u368h9$2vfq7$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1246&group=alt.os.linux#1246

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: address@is.invalid (R.Wieser)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Sat, 6 May 2023 21:05:37 +0200
Organization: A noiseless patient Spider
Lines: 68
Message-ID: <u368h9$2vfq7$1@dont-email.me>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net> <u2tboj$1875h$1@dont-email.me> <0kp9ijx8qr.ln2@Telcontar.valinor> <u30i6p$1si24$1@dont-email.me> <u311d6$1v2am$1@dont-email.me> <u341hr$2h4q1$3@dont-email.me>
Injection-Date: Sat, 6 May 2023 19:07:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="51d8795454f51509b6d533ee2e784f89";
logging-data="3129159"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/hrsd5yDp4CJ3nTgOzI9QIF5D1ZQMq/OOxvib05Utckw=="
Cancel-Lock: sha1:1YtUiPBmBFASfCRjJOpyB8BOoZU=
X-MSMail-Priority: Normal
X-Priority: 3
X-RFC2646: Format=Flowed; Original
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
 by: R.Wieser - Sat, 6 May 2023 19:05 UTC

Ron,

> Thanks for the explanation. Not completely clear on the spawning
> and environment, but it gives me something to look up.

Yep, it gives you something search for. But as you might get a /lot/ thrown
at you when you google for either of those words I'm going to make it a bit
easier for you :

Spawning - starting a new process, mostly by loading and executing a
program.

Environment : each process runs in its own bit of memory, and has its own
storage for data.

Though in this, bash case the "environment" I'm talking about is what you
see when you execute the command "env" or "printenv". Each of the
displayed lines contains an "environment variable name", followed by an "="
and than its data.

To uzse them on the commandline or in a (bash) script those words need to be
prefixed with a "$". Like

echo $USER

or

echo $HOME

You can also make your own, like this :

set myvar=I am $USER
echo $myvar

The "problem" is that when you put those above two lines in a bash script
and execute it. It displays the correct output, but you won't find the
"myvar" environment variable back when you afterwards type "env" on the
commandline - even though you can see the name and its contents when you add
that "env" command to the script itself.

Why ?

Because of what I mentioned above : when you start a (bash) script the
normal way a new bash process gets started (with its own copy of its parents
environment variables!), which than executes the script. After the script
ends the started bash process also ends, and its copy of the environment
variables gets thrown away.

IOW, any changes you make to its environment disappear.

And thats where "sourcing" comes in : when you "source" a script there is no
new bash process started, but the script runs in the bash process you typed
the "source {scriptname}" command in.

And that means that when you than run script with the above two lines
"sourced" the environment variable does /not/ disappear.

You can do more with "sourcing", but the above is pretty-much it in a
nutshell.

Hope that helps.

Regards,
Rudy Wieser

Re: bash - executing "history" commands - inconsistent results

<k70mij-r22.ln1@jefferson.foo>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1247&group=alt.os.linux#1247

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: phaywood@alphalink.com.au (Peter 'Shaggy' Haywood)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Mon, 08 May 2023 11:35:16 +1000
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <k70mij-r22.ln1@jefferson.foo>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net> <u2tboj$1875h$1@dont-email.me> <0kp9ijx8qr.ln2@Telcontar.valinor> <u30i6p$1si24$1@dont-email.me> <u30ipm$1sjoh$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8Bit
Injection-Info: dont-email.me; posting-host="12417286081dcb3b82c5d36831a8d3e3";
logging-data="4102960"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+kENcapy+PBsOmoHOv5Zz11LLhQuExr2E="
User-Agent: KNode/0.10.9
Cancel-Lock: sha1:5pi10+Jus34kFoITPwMjBeimNHE=
 by: Peter 'Shaggy&# - Mon, 8 May 2023 01:35 UTC

Groovy hepcat Chris Elvidge was jivin' in alt.os.linux on Fri, 5 May
2023 01:25 am. It's a cool scene! Dig it.

> On 04/05/2023 16:15, RonB wrote:
>> On 2023-05-03, Carlos E.R. <robin_listas@es.invalid> wrote:
>>> On 2023-05-03 12:06, R.Wieser wrote:
>>>> Dan,
>>>>
>>>>> What do you mean "preload" ?
>>>>
>>>> executing the script
>>>>
>>>> . ./loadit
>>>
>>> This is not "executing". This is "sourcing (script) loadit".
>>
>> Just curious. What's the difference? I have scripts that load

Sourcing the script executes its commands in the current shell.
Running the script opens a new shell as a child process of the current
shell.

>> For example this script changes the directory, calls another script
>> (lst) to list files, waits till I enter file name, runs Emacs in full
>> height and adds the .fountain extension and then exits the terminal.
>>
>> #!/bin/bash
>> cd ~/Documents/scripts
>> lst lfount
>> read -p 'file: ' uservar
>> em $uservar &
>> exit
>>
>> If I just run it, it doesn't exit the terminal, but if I source it,
>> it does. I know it works, but I don't know why. Or maybe I do —
>> waiting for me to exit Emacs before exiting the terminal?
>
> Remove the `exit` line?

No; he wants to exit the shell at the end of the script. The answer is
to leave the exit command there and simply source the script, as he is
doing.
He probably doesn't need the shebang line, though.

--

----- Dig the NEW and IMPROVED news sig!! -----

-------------- Shaggy was here! ---------------
Ain't I'm a dawg!!

Re: bash - executing "history" commands - inconsistent results

<u3dpgi$a5n2$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1248&group=alt.os.linux#1248

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ronb02NOSPAM@gmail.com (RonB)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Tue, 9 May 2023 15:40:02 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 71
Message-ID: <u3dpgi$a5n2$1@dont-email.me>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net>
<u2tboj$1875h$1@dont-email.me> <0kp9ijx8qr.ln2@Telcontar.valinor>
<u30i6p$1si24$1@dont-email.me> <u311d6$1v2am$1@dont-email.me>
<u341hr$2h4q1$3@dont-email.me> <u368h9$2vfq7$1@dont-email.me>
Injection-Date: Tue, 9 May 2023 15:40:02 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="dbcbe9d91245ad42fa0548bf661e1e2f";
logging-data="333538"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/pn3RR8chrhEtxuGZ9dLAD"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:TsynGNaiYCZXqvzyBUQ0p2Eex88=
 by: RonB - Tue, 9 May 2023 15:40 UTC

On 2023-05-06, R.Wieser <address@is.invalid> wrote:
> Ron,
>
>> Thanks for the explanation. Not completely clear on the spawning
>> and environment, but it gives me something to look up.
>
> Yep, it gives you something search for. But as you might get a /lot/ thrown
> at you when you google for either of those words I'm going to make it a bit
> easier for you :
>
> Spawning - starting a new process, mostly by loading and executing a
> program.
>
> Environment : each process runs in its own bit of memory, and has its own
> storage for data.
>
> Though in this, bash case the "environment" I'm talking about is what you
> see when you execute the command "env" or "printenv". Each of the
> displayed lines contains an "environment variable name", followed by an "="
> and than its data.
>
> To uzse them on the commandline or in a (bash) script those words need to be
> prefixed with a "$". Like
>
> echo $USER
>
> or
>
> echo $HOME
>
> You can also make your own, like this :
>
> set myvar=I am $USER
> echo $myvar
>
>
> The "problem" is that when you put those above two lines in a bash script
> and execute it. It displays the correct output, but you won't find the
> "myvar" environment variable back when you afterwards type "env" on the
> commandline - even though you can see the name and its contents when you add
> that "env" command to the script itself.
>
> Why ?
>
> Because of what I mentioned above : when you start a (bash) script the
> normal way a new bash process gets started (with its own copy of its parents
> environment variables!), which than executes the script. After the script
> ends the started bash process also ends, and its copy of the environment
> variables gets thrown away.
>
> IOW, any changes you make to its environment disappear.
>
>
> And thats where "sourcing" comes in : when you "source" a script there is no
> new bash process started, but the script runs in the bash process you typed
> the "source {scriptname}" command in.
>
> And that means that when you than run script with the above two lines
> "sourced" the environment variable does /not/ disappear.
>
> You can do more with "sourcing", but the above is pretty-much it in a
> nutshell.
>
> Hope that helps.

I think I've got it. In my case the answer is, just use source.

--
"Evil preaches tolerance until it is dominant, then it tries to silence good."
-- Archbishop Charles J. Chaput

Re: bash - executing "history" commands - inconsistent results

<u3dq17$a5n2$2@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1249&group=alt.os.linux#1249

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: ronb02NOSPAM@gmail.com (RonB)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Tue, 9 May 2023 15:48:55 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 56
Message-ID: <u3dq17$a5n2$2@dont-email.me>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net>
<u2tboj$1875h$1@dont-email.me> <0kp9ijx8qr.ln2@Telcontar.valinor>
<u30i6p$1si24$1@dont-email.me> <u30ipm$1sjoh$1@dont-email.me>
<k70mij-r22.ln1@jefferson.foo>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 9 May 2023 15:48:55 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="dbcbe9d91245ad42fa0548bf661e1e2f";
logging-data="333538"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19d4X8mYYA3fAIZi1Jhu574"
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:RmnD1yTricP3DFaUS/IFIvl4d8o=
 by: RonB - Tue, 9 May 2023 15:48 UTC

On 2023-05-08, Peter 'Shaggy' Haywood <phaywood@alphalink.com.au> wrote:
> Groovy hepcat Chris Elvidge was jivin' in alt.os.linux on Fri, 5 May
> 2023 01:25 am. It's a cool scene! Dig it.
>
>> On 04/05/2023 16:15, RonB wrote:
>>> On 2023-05-03, Carlos E.R. <robin_listas@es.invalid> wrote:
>>>> On 2023-05-03 12:06, R.Wieser wrote:
>>>>> Dan,
>>>>>
>>>>>> What do you mean "preload" ?
>>>>>
>>>>> executing the script
>>>>>
>>>>> . ./loadit
>>>>
>>>> This is not "executing". This is "sourcing (script) loadit".
>>>
>>> Just curious. What's the difference? I have scripts that load
>
> Sourcing the script executes its commands in the current shell.
> Running the script opens a new shell as a child process of the current
> shell.

Thanks. So "& exit" just exits out of the child process when executed, but
out of the terminal when using source. I'll just keep using source.

>>> For example this script changes the directory, calls another script
>>> (lst) to list files, waits till I enter file name, runs Emacs in full
>>> height and adds the .fountain extension and then exits the terminal.
>>>
>>> #!/bin/bash
>>> cd ~/Documents/scripts
>>> lst lfount
>>> read -p 'file: ' uservar
>>> em $uservar &
>>> exit
>>>
>>> If I just run it, it doesn't exit the terminal, but if I source it,
>>> it does. I know it works, but I don't know why. Or maybe I do —
>>> waiting for me to exit Emacs before exiting the terminal?
>>
>> Remove the `exit` line?
>
> No; he wants to exit the shell at the end of the script. The answer is
> to leave the exit command there and simply source the script, as he is
> doing.
> He probably doesn't need the shebang line, though.

You're right about removing the shebang line (tested it). But when I take it
out I lose my "code" highlighting. So I'll leave that in also.

Again, thanks. And thanks to everyone for being patient with a slow student.

--
"Evil preaches tolerance until it is dominant, then it tries to silence good."
-- Archbishop Charles J. Chaput

bash - executing "history" commands - inconsistent results

<u2t5re$17b4u$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3043&group=alt.os.linux#3043

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: address@is.invalid (R.Wieser)
Newsgroups: alt.os.linux
Subject: bash - executing "history" commands - inconsistent results
Date: Wed, 3 May 2023 10:26:07 +0200
Organization: A noiseless patient Spider
Lines: 35
Message-ID: <u2t5re$17b4u$1@dont-email.me>
Injection-Date: Wed, 3 May 2023 08:26:22 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3cfebaed5868f6c645690b73481d0c87";
logging-data="1289374"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/G90WP31hQ5IOR6/hyVfu4Oq7o4O4hN1zdpbGs+SmOIQ=="
Cancel-Lock: sha1:Ra/wAr291qJjURwhJ/wtW//ap3c=
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Priority: 3
X-MSMail-Priority: Normal
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
 by: R.Wieser - Wed, 3 May 2023 08:26 UTC

Hello all,

I would like to clean-up my bash history and than preload a certain command.
I would like to preload that script.

The problem is that it only works partially, and I have no idea why.

Assume the scripts name is "cleanhist" and its contents are :

- - - - - - - -
#!/bin/bash
history -c
history -s foobar
- - - - - - - -

running this script "dotted"

.. ./cleanhist

clears the history and adds the "foobar" entry.

However, when I preload that script and than execute it it only empties the
history but does not add the "foobar" entry.

Question : why does the "dotted" script work, but does the preloaded one
only work parially (ignores the "-s" line) ? How do I fix it ?

Regards,
Rudy Wieser

P.s.
I already have a work-around exporting the history to a file, modifying it
and than reloading that file, but would like to use a cleaner solution.

Re: bash - executing "history" commands - inconsistent results

<slrnu54ams.t5.dan@djph.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3044&group=alt.os.linux#3044

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dan@djph.net (Dan Purgert)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Wed, 3 May 2023 09:34:21 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <slrnu54ams.t5.dan@djph.net>
References: <u2t5re$17b4u$1@dont-email.me>
Injection-Date: Wed, 3 May 2023 09:34:21 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ad8f74868aa2a4ffb65e0b4ac64ae558";
logging-data="1303625"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX184wDjOa1uXtr3+U4tGgVUyqO5fp06H4eY="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:bpf4Xk3oMwo9+G1SXGZKw6Pu5mA=
 by: Dan Purgert - Wed, 3 May 2023 09:34 UTC

On 2023-05-03, R.Wieser wrote:
> Hello all,
> [...]
> Assume the scripts name is "cleanhist" and its contents are :
>
> - - - - - - - -
> #!/bin/bash
> history -c
> history -s foobar
> - - - - - - - -
>
> running this script "dotted"
>
> . ./cleanhist
>
> clears the history and adds the "foobar" entry.

You're sourcing the script there ...

>
> However, when I preload that script and than execute it it only
> empties the history but does not add the "foobar" entry.

What do you mean "preload" ?

--
|_|O|_|
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860

Re: bash - executing "history" commands - inconsistent results

<u2tboj$1875h$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3045&group=alt.os.linux#3045

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: address@is.invalid (R.Wieser)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Wed, 3 May 2023 12:06:56 +0200
Organization: A noiseless patient Spider
Lines: 29
Message-ID: <u2tboj$1875h$1@dont-email.me>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net>
Injection-Date: Wed, 3 May 2023 10:07:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3cfebaed5868f6c645690b73481d0c87";
logging-data="1318065"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+midhmfv0hAAgSsAgFENP7bXjIeglYPpLBjeijuDmn6Q=="
Cancel-Lock: sha1:lz+gIgMTXXfebOJnrqlZe9k4crg=
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MSMail-Priority: Normal
X-Priority: 3
 by: R.Wieser - Wed, 3 May 2023 10:06 UTC

Dan,

> What do you mean "preload" ?

executing the script

.. ./loadit

with the contents

- - - - - - - -
cleanist() {
history -c
history -s foobar
} - - - - - - - -

and after that, on the commandline, type

cleanhist

to execute the preloaded functions contents

(also see "declare -F")

Regards,
Rudy Wieser

Re: bash - executing "history" commands - inconsistent results

<slrnu54du4.t5.dan@djph.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3046&group=alt.os.linux#3046

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dan@djph.net (Dan Purgert)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Wed, 3 May 2023 10:29:25 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <slrnu54du4.t5.dan@djph.net>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net>
<u2tboj$1875h$1@dont-email.me>
Injection-Date: Wed, 3 May 2023 10:29:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ad8f74868aa2a4ffb65e0b4ac64ae558";
logging-data="1316867"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/h6MEtrfYGBQC1JLCTB9hYAiu22T2yxDg="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:sjX+FY1bBl0R4PbS+luL+gHwEx8=
 by: Dan Purgert - Wed, 3 May 2023 10:29 UTC

On 2023-05-03, R.Wieser wrote:
> Dan,
>
>> What do you mean "preload" ?
>
> executing the script
>
> . ./loadit

Okay, wait. You said this syntax was "running it 'dotted'" in MID
<u2t5re$17b4u$1@dont-email.me> . Now you're saying this is "preloaded".

Do you REALLY mean to say that running the script directly from the
prompt works, and sourcing it does not?

--
|_|O|_|
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860

Re: bash - executing "history" commands - inconsistent results

<0kp9ijx8qr.ln2@Telcontar.valinor>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3047&group=alt.os.linux#3047

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.imp.ch!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E.R.)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Wed, 3 May 2023 12:28:48 +0200
Lines: 15
Message-ID: <0kp9ijx8qr.ln2@Telcontar.valinor>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net>
<u2tboj$1875h$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net I4i3K93I/50MoZfytvTlNQAHYMtawC8V1rpjhPJdFIkqSfdKeG
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:Be6YYXg8uG4ooKvw4NMWRf5zIIc=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Content-Language: es-ES, en-CA
In-Reply-To: <u2tboj$1875h$1@dont-email.me>
 by: Carlos E.R. - Wed, 3 May 2023 10:28 UTC

On 2023-05-03 12:06, R.Wieser wrote:
> Dan,
>
>> What do you mean "preload" ?
>
> executing the script
>
> . ./loadit

This is not "executing". This is "sourcing (script) loadit".

--
Cheers, Carlos.

Re: bash - executing "history" commands - inconsistent results

<gaq9ijx49l.ln2@Telcontar.valinor>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3048&group=alt.os.linux#3048

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.imp.ch!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: robin_listas@es.invalid (Carlos E.R.)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Wed, 3 May 2023 12:40:48 +0200
Lines: 25
Message-ID: <gaq9ijx49l.ln2@Telcontar.valinor>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net>
<u2tboj$1875h$1@dont-email.me> <slrnu54du4.t5.dan@djph.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: individual.net Z9v5eQNbueAtBGFlgpAR1gYgX8ko1+q5ozAIONFDHwy+m4zQSw
X-Orig-Path: Telcontar.valinor!not-for-mail
Cancel-Lock: sha1:yHihWeh7A0fsEQ8Yk/uAhvqHdBE=
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.9.1
Content-Language: es-ES, en-CA
In-Reply-To: <slrnu54du4.t5.dan@djph.net>
 by: Carlos E.R. - Wed, 3 May 2023 10:40 UTC

On 2023-05-03 12:29, Dan Purgert wrote:
> On 2023-05-03, R.Wieser wrote:
>> Dan,
>>
>>> What do you mean "preload" ?
>>
>> executing the script
>>
>> . ./loadit
>
> Okay, wait. You said this syntax was "running it 'dotted'" in MID
> <u2t5re$17b4u$1@dont-email.me> . Now you're saying this is "preloaded".
>
> Do you REALLY mean to say that running the script directly from the
> prompt works, and sourcing it does not?

I think he is sourcing a script that contains functions, and then
calling the functions from that bash session.

But the function was named "cleanist()", then he calls "cleanhist".

--
Cheers, Carlos.

Re: bash - executing "history" commands - inconsistent results

<slrnu54f0k.t5.dan@djph.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3049&group=alt.os.linux#3049

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!rocksolid2!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dan@djph.net (Dan Purgert)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Wed, 3 May 2023 10:47:49 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <slrnu54f0k.t5.dan@djph.net>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net>
<u2tboj$1875h$1@dont-email.me> <slrnu54du4.t5.dan@djph.net>
<gaq9ijx49l.ln2@Telcontar.valinor>
Injection-Date: Wed, 3 May 2023 10:47:49 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ad8f74868aa2a4ffb65e0b4ac64ae558";
logging-data="1327952"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19joSvq8DIB/vqIPSemYM6Nw8wpd7Leqz0="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:z5cbYUM9Xz3NMgZ4iIsEKfkAzFo=
 by: Dan Purgert - Wed, 3 May 2023 10:47 UTC

On 2023-05-03, Carlos E.R. wrote:
> On 2023-05-03 12:29, Dan Purgert wrote:
>> On 2023-05-03, R.Wieser wrote:
>>> Dan,
>>>
>>>> What do you mean "preload" ?
>>>
>>> executing the script
>>>
>>> . ./loadit
>>
>> Okay, wait. You said this syntax was "running it 'dotted'" in MID
>> <u2t5re$17b4u$1@dont-email.me> . Now you're saying this is "preloaded".
>>
>> Do you REALLY mean to say that running the script directly from the
>> prompt works, and sourcing it does not?
>
> I think he is sourcing a script that contains functions, and then
> calling the functions from that bash session.

Nice catch, I didn't even see he changed it between the two posts to
include a function definition. I need more coffee :)

--
|_|O|_|
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860

Re: bash - executing "history" commands - inconsistent results

<u2tgdf$18tct$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=3050&group=alt.os.linux#3050

  copy link   Newsgroups: alt.os.linux
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: address@is.invalid (R.Wieser)
Newsgroups: alt.os.linux
Subject: Re: bash - executing "history" commands - inconsistent results
Date: Wed, 3 May 2023 13:04:02 +0200
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <u2tgdf$18tct$1@dont-email.me>
References: <u2t5re$17b4u$1@dont-email.me> <slrnu54ams.t5.dan@djph.net> <u2tboj$1875h$1@dont-email.me> <slrnu54du4.t5.dan@djph.net>
Injection-Date: Wed, 3 May 2023 11:26:39 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3cfebaed5868f6c645690b73481d0c87";
logging-data="1340829"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/g1Zu9dt8pBYiSSKT4BGknDEMTn8yDsLabYMNpk4XDgw=="
Cancel-Lock: sha1:yTPqZvb8bgDd+Wjek3fd5lhCjYc=
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-Priority: 3
X-MSMail-Priority: Normal
 by: R.Wieser - Wed, 3 May 2023 11:04 UTC

Dan,

> Okay, wait. You said this syntax was "running it 'dotted'" in MID
> <u2t5re$17b4u$1@dont-email.me> . Now you're saying this is "preloaded".

I posted that I tried BOTH, and that the results differ.

> Nice catch, I didn't even see he changed it between the two posts
> to include a function definition.

How come ? Thats what you asked for : an explanation of what I called
"preloaded"

> I need more coffee :)

Yep, you do. :-)

Regards,
Rudy Wieser

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor