1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
#!/bin/sh
# vim: set filetype=sh :
# file: example.rename_logfile
# syntax: example.rename_logfile <first_logfile> <real_logfile>
# copyright: Bernd Schumacher <bernd.schumacher@hpe.com> (2007-2020)
# license: GNU General Public License, version 3
# description: example script that changes logfilename
# warning: do not use this as an example, because iashell is not designed
# for small functions. To learn more please read shellia(7)
# see also: test.rename_logfile
set -e
set -u
# this example is just to test some features of ia
# but ia should not be used in that way in real scripts
if [ $# -ne 2 ]; then
echo "Usage example.rename_logfile <first_logfile> <real_logfile>"
exit 1
fi
ia_logfile="$1"
[ -f ia ] && . ./ia.log || . /usr/share/shellia/ia.log
ia_logout "using first logfile $ia_logfile"
ia_check_logfile "$2"
ia_logout "using real logfile $ia_logfile"
|