2014-git-work/shellscript/jtalk2.sh
2012-08-28 22:46:51 +09:00

15 lines
No EOL
296 B
Bash

#!/bin/sh
# 文字しゃべる君 2
# 同じディレクトリにあるtalk.txtの内容を1行ごとに読み上げる
# * OS X only
cd "${0%/*}"
ln=1
while read -p "> " line; do
if [ "$line" = "" ]; then
line="`sed -n ${ln}p talk.txt`"
((ln++))
fi
echo "$line"
say "$line"
done