2008年7月24日木曜日

(Code: sh) seq-text

#!/bin/sh

FILE=src/text.txt
if [ ! -f $FILE ] ;then
echo "Error: file \"$FILE\" not exist" >&2
exit 1
fi

LISTS=`cat $FILE |tr '\n' ' '`
cat script/seq-text.scm \
|sed -e 's/;.*//g' -e 's/<lists>/'"$LISTS"'/' \
|gimp -i -b -