2014-git-work/shellscript/jtalk2.sh

15 lines
296 B
Bash
Raw Permalink Normal View History

2012-08-28 22:46:51 +09:00
#!/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