Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • I'm guessing that your NOSUCHVARIABLE is supposed to represent the environment variable I set in the crontab: RUN_BY_CRON ??? Commented Jan 20 at 3:27
  • Yes; it's an example of a variable that wouldn't normally exist. Commented Jan 20 at 3:49
  • OK - thanks. I've just done a quick test using RUN_BY_CRON=${RUN_BY_CRON-""}. That seems to be all I need in my case. AFAIC, this is a correct answer --- and the accepted answer :) Commented Jan 20 at 3:53
  • Just one other thing: Do you have a link to the GNU docs on this technique?... Is this it? Commented Jan 20 at 4:22
  • 1
    @Seamus It's in POSIX, so you can look there. Commented Jan 20 at 5:15