Last change
on this file since 2 was
2,
checked in by pinsard, 15 years ago
|
first commit with original work of Francoise Pinsard
|
-
Property svn:executable set to
*
-
Property svn:keywords set to
Id
|
File size:
1.6 KB
|
Rev | Line | |
---|
[2] | 1 | #! /bin/sh |
---|
| 2 | # |
---|
| 3 | #+ |
---|
| 4 | # |
---|
| 5 | # NAME |
---|
| 6 | # ==== |
---|
| 7 | # |
---|
| 8 | # plogd.sh - prints the most recent release of ${IRCAAM_LOG}/action.log.AAAA-MM-JJTHH:MM:SSZ |
---|
| 9 | # |
---|
| 10 | # SYNOPSIS |
---|
| 11 | # ======== |
---|
| 12 | # |
---|
| 13 | # :: |
---|
| 14 | # |
---|
| 15 | # $ plogd.sh action |
---|
| 16 | # |
---|
| 17 | # |
---|
| 18 | # DESCRIPTION |
---|
| 19 | # =========== |
---|
| 20 | # |
---|
| 21 | # ``plogd.sh`` prints the most recent release of ${IRCAAM_LOG}/action.log.YYYY-MM-DDTHH:MM:SSZ. |
---|
| 22 | # |
---|
| 23 | # |
---|
| 24 | # It uses a2ps application. |
---|
| 25 | # |
---|
| 26 | # Print is one on the default printer. |
---|
| 27 | # |
---|
| 28 | # SEE ALSO |
---|
| 29 | # ======== |
---|
| 30 | # |
---|
| 31 | # ircaam_profile.sh_ |
---|
| 32 | # |
---|
| 33 | # .. _ircaam_profile.sh : ircaam_profile.sh.html |
---|
| 34 | # |
---|
| 35 | # dlogd.sh_ |
---|
| 36 | # |
---|
| 37 | # .. _dlogd.sh : dlogd.sh.html |
---|
| 38 | # |
---|
| 39 | # elogd.sh_ |
---|
| 40 | # |
---|
| 41 | # .. _elogd.sh : elogd.sh.html |
---|
| 42 | # |
---|
| 43 | # tlogd.sh_ |
---|
| 44 | # |
---|
| 45 | # .. _tlogd.sh : tlogd.sh.html |
---|
| 46 | # |
---|
| 47 | # FILES |
---|
| 48 | # ===== |
---|
| 49 | # |
---|
| 50 | # original location |
---|
| 51 | # ~~~~~~~~~~~~~~~~~ |
---|
| 52 | # |
---|
| 53 | # /usr/home/fplod/incas/ircaam/ircaam_ws/src/plogd.sh sur cerbere.locean-ipsl.upmc.fr |
---|
| 54 | # |
---|
| 55 | # EVOLUTIONS |
---|
| 56 | # ========== |
---|
| 57 | # |
---|
| 58 | # $Id$ |
---|
| 59 | # |
---|
| 60 | # - fplod 2006-02-20T16:15:35Z aedon.lodyc.jussieu.fr (Darwin) |
---|
| 61 | # |
---|
| 62 | # * posix |
---|
| 63 | # |
---|
| 64 | #- |
---|
| 65 | # |
---|
| 66 | set -u |
---|
| 67 | system=$(uname) |
---|
| 68 | case "${system}" in |
---|
| 69 | AIX|IRIX64) |
---|
| 70 | echo " www : no specific posix checking" |
---|
| 71 | ;; |
---|
| 72 | *) |
---|
| 73 | set -o posix |
---|
| 74 | ;; |
---|
| 75 | esac |
---|
| 76 | # |
---|
| 77 | command=$(basename ${0}) |
---|
| 78 | # |
---|
| 79 | if [ "${1}" = "" ] |
---|
| 80 | then |
---|
| 81 | echo "${command} : eee : 1st parameter missing" >&2 |
---|
| 82 | exit 1 |
---|
| 83 | fi |
---|
| 84 | # test if a2ps available |
---|
| 85 | tool=a2ps |
---|
| 86 | type ${tool} 1> /dev/null 2>&1 |
---|
| 87 | status=${?} |
---|
| 88 | if [ ${status} -ne 0 ] |
---|
| 89 | then |
---|
| 90 | echo "${command} : eee : ${tool} unavailable" >&2 |
---|
| 91 | exit 4 |
---|
| 92 | fi |
---|
| 93 | unset tool |
---|
| 94 | unset status |
---|
| 95 | # |
---|
| 96 | systeme=`uname` |
---|
| 97 | # |
---|
| 98 | log=$(find ${IRCAAM_LOG} -name "${1}.log.????-??-??T??:??:??Z" | sort | \ |
---|
| 99 | tail -n 1) |
---|
| 100 | tmp=${?} |
---|
| 101 | if [ ${tmp} -eq 0 ] |
---|
| 102 | then |
---|
| 103 | if [ "${log}" = "" ] |
---|
| 104 | then |
---|
| 105 | echo "${command} : eee : no release of ${IRCAAM_LOG}/${1}.log" >&2 |
---|
| 106 | exit 1 |
---|
| 107 | else |
---|
| 108 | # printing |
---|
| 109 | a2ps --print-anyway=1 ${log} |
---|
| 110 | exit 0 |
---|
| 111 | fi |
---|
| 112 | else |
---|
| 113 | exit 1 |
---|
| 114 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.