wineをスクリプト内で使う

0

単体では機能するスクリプトになっているのだが、HyperEstraierのギャザラからの呼び出しで機能しないのですが・・・なぜ?
誰か教えてください!! m(_ _)m
単体で機能しているフィルタ
#! /bin/sh
# set variables
#LD_LIBRARY_PATH=”/usr/local/lib:/usr/local/lib/wine” ; export LD_LIBRARY_PATH
PATH=”$PATH:/usr/local/sbin:/usr/X11R6/bin
:/root/.wine/drive_c/windows/system32:/root/.wine” ; export PATH
LANG=”ja_JP.UTF-8″ ; export LANG
WINEPREFIX=/root/.wine ; export WINEPREFIX
progname=”estfxdoc2txt”
WINE=”/usr/local/bin/wine”
XDOC2TXT=”/usr/local/sbin/xdoc2txt.exe”
ICONV=”/usr/local/bin/iconv”
SED=”/bin/sed”
# check arguments
if [ $# -lt 1 ]
then
printf ‘%s: usage: %s infile [outfile]n’ “$progname” “$progname” 1>&2
exit 1
fi
infile=”$1″
outfile=”$2″
if [ -n “$ESTORIGFILE” ] && [ -f “$ESTORIGFILE” ]
then
infile=”$ESTORIGFILE”
fi
# check the input
if [ “!” -f “$infile” ]
then
printf ‘%s: %s: no such filen’ “$progname” “$infile” 1>&2
exit 1
fi
# initialize the output file
if [ -n “$outfile” ]
then
rm -f “$outfile”
fi
# function to output
output(){
if [ -n “$outfile” ]
then
cat >> “$outfile”
else
cat
fi
}
# limit the resource
#ulimit -v 524288 -t 10 2> “/dev/null”
# output the result
$WINE $XDOC2TXT -n -r=0 -o=1 “$infile” | $ICONV -f CP932 -t UTF-8 -c | $SED -e ‘s/ //g’ -e ‘s/^M//g’ | output
# exit normally
exit 0
# END OF FILE
で、それを呼び出している行がこれ
estcmd gather -il ja -ic UTF-8 -fx “.rtf,.docx,.xlsx,.pptx,.doc,.xls,.ppt,.pdf,.mht,.html,.eml,.sxw,.sxc,
.sxi,.sxd,.odt,.ods,.odp,.odg,.jaw,.jtw,.jbw,.juw,.jfw,.jvw,.jtd,.jtt,
.oas,.oa2,.oa3,.bun,.wj2,.wj3,.wk3,.wk4,.123,.wri”
“T@estfxdoc2txt” -fz -sd -cm -um -pc UTF-8 -cs 400 -lf 64 $subdex $target
テスト用に.xlsだけ抜いてxlhtmlと切り替えて実験したとき。
estcmd gather -il ja -fx “.xls” “T@estfxdoc2txt” -fz -sd -cm -um -pc UTF-8 -cs 400 -lf 64 インデックス 対象
場合分けした結果、やっぱりwineで動かしたxdoc2txt.exeの時だけxcmd-out-hogehoge.estが空っぽ。
wineを使ったときのリダイレクトとか調べているのですが・・・

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です