commit ccbf3d46207ec5d4af39b20c7035b88a91556785 parent cb282dbc43bf619f59111b30df2b663e3a644f74 Author: sin <sin@2f30.org> Date: Fri, 10 Oct 2014 12:53:52 +0100 Add ratox-textout Diffstat:
A | ratox-textout | | | 15 | +++++++++++++++ |
1 file changed, 15 insertions(+), 0 deletions(-)
diff --git a/ratox-textout b/ratox-textout @@ -0,0 +1,15 @@ +#!/bin/sh +test x"$1" = x"" && exit 1 + +idstr="$1" +textout="${idstr}/text_out" +textin="${idstr}/text_in" +history="${idstr}/history" +namefile="name/out" + +touch "${history}" +sob | tee -a "${history}" "${textin}" | while read -r msg; do + name=$(cat "${namefile}") + test x"$name" = x"" && name="Anonymous" + printf '%s : %s < %s\n' "`date +'%Y-%m-%d %H:%M'`" "${name}" "${msg}" >> "${textout}" +done