Hello sorry about my english, here is what I ve done but it isnt workin fine......
this piece comes from /var/spool/hylafax/bin/faxrcvd and I put MYCODE in various places of faxrecvd file
I want to move the file(fax0000001.tif) to an userfordel(wich will be shared by samba) and erase it from /var/spool/hylafax/recvq/ IF the callers number match in faxdispatch.....
if not then the file must be moved to another "public folder"
but it isnt working just the part whe the file is moved or erased...... Im not a programer sorry, I really need your help.. look
FILENAME=`echo $FILE | $SED -e 's/\.tif//' -e 's/recvq\///'`
SENDER="`$INFO $FILE | $AWK -F: '/Sender/ { print $2 }' 2>$ERRORSTO | $SED 's/^.//'`"
SUBADDR="`$INFO $FILE | $AWK -F: '/SubAddr/ { print $2 }' 2>$ERRORSTO | $SED 's/^.//'`"
#
# Apply customizations. All customizable variables should
# be set to their non-customized defaults prior to this.
#
if [ -f etc/FaxDispatch ]; then
. etc/FaxDispatch # NB: FaxDispatch sets SENDTO
fi
# BY MY "MYCODE"
echo $FILENAME.tif > .move.file; # a text file just to verify, the file is created with data
echo $SENDTO > .sendto.file; # a text file just to verify,the file is created with data
FILE=`cat .move.file`
USERFOLDER=`cat .sendto.file | sed -e 's/\@mydomain.com.ar//'` # sendto is set by faxdispatch!! and i cut @domain to set teh userfolder var
# for test
echo $FILE > FILE.txt # a text file just to verify, the file is created with data
echo $USERFOLDER > path.txt # a text file just to verify, the file is created with data
mv -v $SPOOL$FILE /home/$USERFOLDER > 1ermove.txt #tit isnt working this file is created empty
mv -v $SPOOL$FILE /home/$USERFOLDER > 2domove.txt #tit isnt working this file is created empty
# Ive tried everithing I know!!
if [ 1 = 1 ]; then
mv -v $SPOOL$FILE /home/$USERFOLDER > $FILE$SPOOL.txt # isnt working
else
echo "fallo el 1a1 del if" > if.txt
fi
/var/spool/hylafax/bin/1 > 1despuesif.txt # isnt working
rm /var/spool/hylafax/recvq/$FILE # isnt working
if I call to other script it is executed but the file isnt moved......
the file contimues normaly......
can some programer help me, is any semi-colon bad or ...
thanks