2018-01-27 17:57:57 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# (0) Get current ABS directory
|
|
|
|
ROOT=$(dirname `realpath $0`);
|
|
|
|
|
|
|
|
# (1) Check arguments
|
2018-01-30 16:02:51 +00:00
|
|
|
test $# -lt 2 && echo "ERR: Missing arguments (id, message)" && exit 1;
|
2018-01-27 17:57:57 +00:00
|
|
|
|
|
|
|
# (2) load configuration file
|
2018-01-30 16:02:51 +00:00
|
|
|
test -f /tmp/outbuf_$1 || ( echo "ERR: No such id" && exit 1 ) || exit 1;
|
2018-01-27 17:57:57 +00:00
|
|
|
|
|
|
|
# (3) Write content to file
|
2018-01-30 16:02:51 +00:00
|
|
|
echo -ne "$2" >> /tmp/outbuf_$1;
|