six demon bag
Wind, fire, all that kind of thing!
MongoDB provides an interactive command shell for working with the database. Which is all nice and dandy, but from an admin and automation perspective it's desirable to also be able to run commands non-interactively. The
mongo commandline tool does have a parameter
--eval that kind of allows you to do that:
except that it doesn't play nice when you also want to automatically authenticate via the config file
Posted 01:29 [permalink]
This is a short series describing some Bash constructs that I frequently use in my scripts.
What do you do when you run fully automated scripts in the background, but still want to keep track of what they're doing and, more importantly, when something goes wrong? The answer is, of course, you log what the script is doing (or is about to do).
There are two commonly used ways of implementing logging in Bash scripts:
Personally, I prefer the latter, since it allows not only for managing log files independently of the process creating the log output, but also for filtering log data and/or forwarding it to a central loghost.
Posted 20:47 [permalink]