LazyLibrarian/example_custom_notification.sh
2017-03-16 18:18:55 +01:00

18 lines
395 B
Bash
Executable File

#!/bin/bash
# The parameter list passed is a list of database columns (name and data)
# for a book or magazine.
# For this example, just write the arguments to a file
ofile='notification.out'
echo -n "" > $ofile
arg=1
numargs=$#
while (( arg < numargs)); do
# column name
echo -n "${!arg}: " >> $ofile
(( arg += 1 ))
# value
echo "${!arg}" >> $ofile
(( arg += 1 ))
done