IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31194


Ignore:
Timestamp:
Apr 6, 2011, 10:29:18 AM (15 years ago)
Author:
Serge CHASTEL
Message:

Documentation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/mysql-dump/functions.sh

    r31190 r31194  
    11#!/bin/bash
    22
     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
    315function log() {
    416    LOGLEVEL=`printf ":%8s:" $1`
     
    921}
    1022
     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"
    1131function email() {
    1232    SUBJECT=$1
Note: See TracChangeset for help on using the changeset viewer.