Код: Выделить всё
[f0s@router] /root/bin/> cat uploads.sh
#!/bin/sh
cd /tmp/uploads
if [ -e *.* ]
then
ftp -u ftp://username:password@artishok.artpromcompany.ru/ *.*
cd /tmp/uploads
rm -rf /tmp/uploads
mkdir /tmp/uploads
chmod 777 /tmp/uploads
/usr/local/bin/lynx -source http://artishok.artpromcompany.ru/modules/warehouse/exchange.php
else
fi
exit 0
[f0s@router] /root/bin/>
Код: Выделить всё
[f0s@router] /root/bin/> ./uploads.sh
[: Z00089.jpg: unexpected operator
Код: Выделить всё
[f0s@router] /root/bin/> ll /tmp/uploads/
total 142
-rw-r--r-- 1 lukov wheel 42770 16 июл 17:54 Z00089.jpg
-rw-r--r-- 1 lukov wheel 101506 17 июл 10:49 catalogue_objects.csv
[f0s@router] /root/bin/>
Код: Выделить всё
[f0s@router] /root/bin/> [f0s@router] /root/bin/> ./uploads.sh
Connected to artishok.artpromcompany.ru.
220 ProFTPD 1.3.0 Server ready.
331 Password required for username.
230 User username logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
200 Type set to I
local: catalogue_objects.csv remote: catalogue_objects.csv
229 Entering Extended Passive Mode (|||35072|)
150 Opening BINARY mode data connection for catalogue_objects.csv
100% |*************************************| 99 KB 2.60 MB/s 00:00 ETA
226 Transfer complete.
101506 bytes sent in 00:00 (1.56 MB/s)
[f0s@router] /root/bin/>
Код: Выделить всё
[f0s@router] /root/bin/> [f0s@router] /root/bin/> ./uploads.sh
Connected to artishok.artpromcompany.ru.
220 ProFTPD 1.3.0 Server ready.
331 Password required for username.
230 User username logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
200 Type set to I
local: Z00089.jpg remote: Z00089.jpg
229 Entering Extended Passive Mode (|||35064|)
150 Opening BINARY mode data connection for Z00089.jpg
100% |*************************************| 42770 335.30 KB/s 00:00 ETA
226 Transfer complete.
42770 bytes sent in 00:00 (288.94 KB/s)
[f0s@router] /root/bin/>
уж не знаю в чем и глюк.. причем иногда нормлаьно все работает...