From 2e54dcfdff207c16de16adc34eb1f28da838ecd9 Mon Sep 17 00:00:00 2001 From: "Matteo Nastasi (mop)" Date: Sun, 29 Mar 2009 08:13:34 +0000 Subject: [PATCH] messages reader --- bin/procmsg.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 bin/procmsg.sh diff --git a/bin/procmsg.sh b/bin/procmsg.sh new file mode 100755 index 0000000..2eb25be --- /dev/null +++ b/bin/procmsg.sh @@ -0,0 +1,18 @@ +#!/bin/bash +src="$1" +IFS=" +" +for i in `cat $src`; do + dt="$(echo $i | cut -d '|' -f 1)" + user="$(echo $i | cut -d '|' -f 2)" + subj="$(echo $i | cut -d '|' -f 3)" + mesg="$(echo $i | cut -d '|' -f 4)" + + echo "vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv" + echo "Date :" | tr -d '\n' + date -d @$dt + echo "User: $user" + echo "Subject: $subj" + echo -e "$mesg" + echo "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" +done \ No newline at end of file -- 2.17.1