stoerrisches shell script
Frederik Sdun
frederik.sdun at googlemail.com
Die Dez 2 08:52:45 GMT 2008
Hallo,
is es das was du willst:
FTP=ftp.sh
i=CSS
echo ftp w.x.de '<<EOT' > $FTP
echo passive >>$FTP
echo cd htdocs/BIB >> $FTP
echo ls >> $FTP
for f in $i/*.css
do
echo put $f '#wo bleibt diese Zeile'
echo "put $f" >> ${FTP}
[ touch -nt $f ] && continue
done
echo bye >> $FTP
echo EOT >> $FTP
echo
cat $FTP
für was brauchst du das touch? Ich kann -n garnicht in den manpages
finden und t erwartet noch eine zeit die verwendet werden soll. evtl.
nur touch $f?
ich habe mir mit : "for i in {1..10}; do touch "f$i.css";" done ein paar
testdaten erzeugt und das skript kommt raus:
ftp w.x.de <<EOT
passive
cd htdocs/BIB
ls
put CSS/f1.css
put CSS/f10.css
put CSS/f2.css
put CSS/f3.css
put CSS/f4.css
put CSS/f5.css
put CSS/f6.css
put CSS/f7.css
put CSS/f8.css
put CSS/f9.css
bye
EOT
Gruß Frederik