Reply to post: Not so much a tool as a philosophy

Top tools for junior Linux admins

Robert Moore

Not so much a tool as a philosophy

If you are going to do it more than three times, script it.

OK, maybe cron.

If you are getting good at bash scripting, and want to use cron to run them at scheduled times for some reason they run fine when you run them manually, but fail when run by cron change the first line in the script to:

#!/bin/bash -l

The -l argument specifies a login shell. If your usual login sets a lot of environment variables this can quickly sold a multitude of strange problems.

(Very useful for scripting oracle schema exports/imports.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon


Biting the hand that feeds IT © 1998–2019