Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #223971

Re: Looping Shell Scripts and System Load

From "Martin McCormick" <martin.m@suddenlink.net>
Newsgroups linux.debian.user
Subject Re: Looping Shell Scripts and System Load
Date 2020-06-24 22:00 +0200
Message-ID <AljIR-7DO-1@gated-at.bofh.it> (permalink)
References <Alhe1-6i7-3@gated-at.bofh.it> <AlhH3-6rP-9@gated-at.bofh.it> <Alitr-6Xd-1@gated-at.bofh.it> <AliMP-73V-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Greg Wooledge <wooledg@eeg.ccf.org> writes:
> All-caps names are reserved for environment variables (HOME, PATH),
> and internal shell variables (IFS, PWD, HISTFILE).
> 
> Avoiding all-caps names allows you to avoid collisions with a variable
> name that might be used for something else.  Most of the time.  This
> being the Unix shell, there are *always* stupid exceptions (http_proxy
> and friends on the environment side, and auto_resume and histchars in
> bash).

Thank you.  I learned something today that I didn't
expect to learn which is why I posted the question in the first
place.  I just wasn't thinking, I guess and used the all-caps
names to indicate that they stood for files.  If one collided
with an environment variable name, it could make the script fail
in strange ways that would be totally unpredictable, depending on
which variable one preempted.

Martin

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Looping Shell Scripts and System Load "Martin McCormick" <martin.m@suddenlink.net> - 2020-06-24 19:20 +0200
  Re: Looping Shell Scripts and System Load Roberto C. Sánchez <roberto@debian.org> - 2020-06-24 19:30 +0200
    Re: Looping Shell Scripts and System Load Greg Wooledge <wooledg@eeg.ccf.org> - 2020-06-24 19:50 +0200
  Re: Looping Shell Scripts and System Load Greg Wooledge <wooledg@eeg.ccf.org> - 2020-06-24 19:50 +0200
    Re: Looping Shell Scripts and System Load Roger Price <debian@rogerprice.org> - 2020-06-24 20:40 +0200
      Re: Looping Shell Scripts and System Load Greg Wooledge <wooledg@eeg.ccf.org> - 2020-06-24 21:00 +0200
        Re: Looping Shell Scripts and System Load "Martin McCormick" <martin.m@suddenlink.net> - 2020-06-24 22:00 +0200
    Re: Looping Shell Scripts and System Load Tixy <tixy@yxit.co.uk> - 2020-06-25 11:30 +0200
      Re: Looping Shell Scripts and System Load David <bouncingcats@gmail.com> - 2020-06-25 15:40 +0200
  Re: Looping Shell Scripts and System Load David Christensen <dpchrist@holgerdanske.com> - 2020-06-24 21:40 +0200

csiph-web