On 16/6/24 23:50, Greg Wooledge wrote:
On Sun, Jun 16, 2024 at 06:13:36PM +1000, Keith Bainbridge wrote:

It was late afternoon on 16Jun2024 that I wrote this. Possibly 18:13:36 when I pressed send. I'd reckon it would likely have been 08:13:36 UTC What's wrong with my system clock. I've not really looked at the time on my originals before. I'll try to remember to enter my local time as I press send


     Environment Variables: Bash has a limit on the number of environment
variables it can store, which is typically around 32,000. If you define too
many aliases, you may exceed this limit, causing issues with your shell.

This is not strictly true.  There is no limit imposed by bash; but
there is a limit imposed by the *kernel* on the total size of the
environment plus the argv[] argument vector passed to a process.

<https://www.in-ulm.de/~mascheck/various/argmax/> documents this
extremely thoroughly.

In most cases, when a problem arises with hitting this limit, it's
because the argument list is too long, not the environment.  You seem
to be hitting it from the other direction, though.

Solution: "don't do that".

     Shell Scripting: Bash scripts have a limit on the number of commands
they can execute, which is typically around 64,000.

Thanks Greg

Your comments on the summary provided by the search engine will make me read them with a bigger grain of salt.

Well... that sounds like you're filling up the table of exit statuses
that have been reaped internally.  I think there might have been some
bugs in older versions of bash concerning this issue as well.

Ummm could I be doing this without knowing what it means?

Some people have reported this issue when they run an infinite loop with
an external command inside it (e.g. sleep).

I have 1 sleep line in what is now a function. It was added in an effort to get the USB to unmount after the back-up process and cd to~. I did get a command prompt back, but the USB was still mounted according to df

I don't recall off the top of my head how to work around this issue, if
you're writing "daemon scripts" that run forever and spawn external
commands within a loop.  You might need to Google it.  It's a bit
esoteric.

And I'd suggest beyond me

If you define too many
aliases, you may exceed this limit, causing issues with your shell scripts.

Huh?  I have no idea what this means.  Bash doesn't have a limit on the
number of aliases you can define, as far as I know.


This is again part of the search engine synopsis


Aliases do not work in shell scripts, by default.  You would have to turn
them on with a shopt.  I recommend not doing that.  They're disabled
because they suck.  Use functions instead of aliases, when writing scripts.
They're far more sensible and flexible.

You are re-enforcing other stuff I read last night.


I hope this and my several other responses find you bright and bubbly on a Monday morning. I'm home from a day of cryptic crossword class, and minding 2 month old grand daughter etc. I hope my responses aren't too short.

the time is 17Jun2024@18:25:58

--
All the best

Keith Bainbridge

keithr...@gmail.com
keith.bainbridge.3...@gmail.com
+61 (0)447 667 468

UTC + 10:00

Reply via email to