Changeset 31194
- Timestamp:
- Apr 6, 2011, 10:29:18 AM (15 years ago)
- File:
-
- 1 edited
-
trunk/tools/mysql-dump/functions.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/mysql-dump/functions.sh
r31190 r31194 1 1 #!/bin/bash 2 2 3 # Some useful functions that can be reused in sh scripts 4 5 # log: A limited logging function 6 # 7 # Usage: log ARG1 ARG2 8 # where ARG1: a log level (put what is sensible for you) 9 # ARG2: a message (preferrably enclosed in quotes) 10 # The date is prepended to the log level and message 11 # e.g.: 12 # log USELESS "A useless message" 13 # will show something like: 14 # 2011-04-01T08:00:00: USELESS: A useless message 3 15 function log() { 4 16 LOGLEVEL=`printf ":%8s:" $1` … … 9 21 } 10 22 23 # email: Send an e-mail 24 # 25 # Usage: email SUBJECT RECIPIENT MESSAGE 26 # where SUBJECT: the e-mail subject 27 # RECIPIENT: a valid e-mail address 28 # MESSAGE: a message 29 # e.g.: 30 # email "Monday?" mailing-list@dictators.org "Let's conquer the world" 11 31 function email() { 12 32 SUBJECT=$1
Note:
See TracChangeset
for help on using the changeset viewer.
