<p dir="ltr">Your FILE line is executing a .txt file. I cannot imagine that being intentional.</p>
<div class="gmail_quote">On Jan 22, 2013 12:20 PM, "Chuck Payne" <<a href="mailto:terrorpup@gmail.com">terrorpup@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Guys,<br>
<br>
Ok, I think I have a better script, but I am having a problem with the<br>
for/loop with ftp'ing files, looks like it breaking at the <<+<br>
<br>
Here is my new script<br>
<br>
========================Begin Script=================================<br>
<br>
#!/bin/bash<br>
# ftp script<br>
# by Chuck Payne<br>
# ftp, logs, and moves files<br>
<br>
LOG=$(/var/log/fl_sdirc)<br>
FILES=$(cat /chroot/home/fl/fl_sdirc/files.txt | wc -l)<br>
TIME=$(`date '+%m-%d-%Y %H:%M'`)<br>
FILE=$(/chroot/home/fl/fl_sdirc/files.txt)<br>
<br>
<br>
if [ -e $FILE ] ; then<br>
rm -f $FILE<br>
fi<br>
<br>
ls /chroot/home/fl/fl_sdirc >> /chroot/home/fl/fl_sdirc/files.txt<br>
<br>
if [ $FILE=="0"] ; then<br>
echo "$TIME" >> $LOG<br>
echo "No Files tranfer" >> $LOG<br>
else<br>
<br>
for i in `cat /chroot/home/fl/fl_sdirc/files.txt` ; do<br>
ftp -n 192.168.105.29 <<+<br>
user flsdir essex<br>
binary<br>
put $i<br>
quit ;<br>
done<br>
<br>
echo "$TIME" >> $LOG<br>
echo "File following file were transfer to Pawnee" >> $LOG<br>
<br>
for i in `cat /chroot/home/fl/fl_sdirc/files.txt` ; do<br>
echo "$i" >> $LOG<br>
done<br>
<br>
for i in `cat /chroot/home/fl/fl_sdirc/files.txt` ;<br>
mv $i /home/fl_sdirc/$i.$TIME ;<br>
done<br>
<br>
fi<br>
<br>
<br>
<br>
========================End Script==================================<br>
<br>
<br>
--<br>
Terror PUP a.k.a<br>
Chuck "PUP" Payne<br>
<br>
<a href="tel:%28678%29%20636-9678" value="+16786369678">(678) 636-9678</a><br>
-----------------------------------------<br>
Discover it! Enjoy it! Share it! openSUSE Linux.<br>
-----------------------------------------<br>
openSUSE -- <a href="http://en.opensuse.org/User:Terrorpup" target="_blank">en.opensuse.org/User:Terrorpup</a><br>
openSUSE Ambassador/openSUSE Member<br>
Community Manager -- Southeast Linux Foundation (SELF)<br>
skype,twiiter,identica,friendfeed -- terrorpup<br>
freenode(irc) --terrorpup/lupinstein<br>
Register Linux Userid: 155363<br>
<br>
Have you tried SUSE Studio? Need to create a Live CD, an app you want<br>
to package and distribute , or create your own linux distro. Give SUSE<br>
Studio a try. <a href="http://www.susestudio.com" target="_blank">www.susestudio.com</a>.<br>
See you at Southeast Linux Fest, June 7-9, 2013 in Charlotte, NC.<br>
<a href="http://www.southeastlinuxfest.org" target="_blank">www.southeastlinuxfest.org</a><br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</blockquote></div>