bu arada ki�ik bir soru
script i dediğiniz şekilde �alıştırdıktan sonra
hedef klas�r�n i�erisinde
fetch.out diye bir data dosyası oluşmakta.
bu ve bunun sebebi nedir?
----- Original Message -----
Sent: Tuesday, May 25, 2004 9:23 PM
Subject: Re: [freebsd] fetch - cron ve target !

mesut bey k�c�k bir hata yapmisim hehe;
 
#!/bin/csh
 
if ($# < 2) then
        echo "Kullanim: $0 <hedef_klasor> <fetch_parametreleri>"
        exit(1)
endif
set aktifklasor=`pwd`
set fetch_params=`echo $* | sed s/'$1'//`                 # degisiklik bu satirda $1 ifadesini tirnak icine aldik :)
 
cd $1
fetch $fetch_params
cd $aktifklasor

 

*********** REPLY SEPARATOR ***********

On 25.05.2004 at 18:52 Mesut G�LNAZ wrote:
bu arada bakmadan ipucu olarak eklediğim scripinizde şï¿½yle bir hata alıyorum.
eksik mi var tok sa ben mi yanlış kullandım!
 
su-2.05b# ./indir /home/mes/ ftp://192.0.0.31/sistem/pix/pdm-301.bin
sed: 1: "s//home/mes///": bad flag in substitute command: 'm'
usage: fetch [-146AFMPRUadlmnpqrsv] [-N netrc] [-o outputfile]
             [-S bytes] [-B bytes] [-T seconds] [-w seconds]
             [-h host -f file [-c dir] | URL ...]
su-2.05b# ./indir /home/mes ftp://192.0.0.31/sistem/pix/pdm-301.bin
sed: 1: "s//home/mes//": bad flag in substitute command: 'm'
usage: fetch [-146AFMPRUadlmnpqrsv] [-N netrc] [-o outputfile]
             [-S bytes] [-B bytes] [-T seconds] [-w seconds]
             [-h host -f file [-c dir] | URL ...]
su-2.05b# cat indir
#!/bin/csh
 
if ($# < 2) then
        echo "Kullanim: $0 <hedef_klasor> <fetch_parametreleri>"
        exit(1)
endif
set aktifklasor=`pwd`
set fetch_params=`echo $* | sed s/$1//`
 
cd $1
fetch $fetch_params
cd $aktifklasor
su-2.05b#
 
teşekk�rler!
 
----- Original Message -----
Sent: Tuesday, May 25, 2004 4:50 PM
Subject: Re: [freebsd] fetch - cron ve target !

Mesut bey iyi gunler,
fetch'in hedef klasoru belirleyen bir parametresi yok. size bu isi yapabilen ufak bir script yolluyorum:
 
ee indir
 
#!/bin/csh
 
if ($# < 2) then
        echo "Kullanim: $0 <hedef_klasor> <fetch_parametreleri>"
        exit(1)
endif
set aktifklasor=`pwd`
set fetch_params=`echo $* | sed s/$1//`
 
cd $1
fetch $fetch_params
cd $aktifklasor
##################################
 
bu scripte calistirma hakki vermeyi unutmayin :)
 
 

*********** REPLY SEPARATOR ***********

On 25.05.2004 at 11:15 Mesut G�LNAZ wrote:
fetch kullanarak bir cron yazmak istiyorum. ama fetch ile al�nan dosyan�n belirli bir klas�r�n i�ine indirilmesini istiyorum.
bunun i�in fetch in parametrelerinde bununla ilgili bi�i g�remedim.
 
bunun yerine bir executable dosya yaz�p onu crondan �al�t�rmak yerine bunu fetch ya da ba�ka bir commad ile yapmak m�mk�n m�.
ya da 2 tabe cron yazmak yerine?
 
te�ekk�rler!

Cevap