using dir i m able to get the file name but how to copy it using FTP
output
---------------------------------
+ cd /ednadtu3/u01/pipe/naveed/class
+ echo Enter the month/day
Enter the month/day
+ read value
1020
+ ftp -n ddcappip031.tu.com
+ 0< /tmp/sh3616862.2
Interactive mode off.
-rw-r----- 1 pipe pipe 79895161 Nov 19 23:05 CurrentCollectorMeterReadBackup20081119.tar.gz
-rw-r----- 1 pipe pipe 70604904 Nov 20 23:04 CurrentCollectorMeterReadBackup20081120.tar.gz
-rw-r----- 1 pipe pipe 70907652 Nov 21 23:05 CurrentCollectorMeterReadBackup20081121.tar.gz
-rw-r----- 1 pipe pipe 72986381 Nov 22 23:05 CurrentCollectorMeterReadBackup20081122.tar.gz
-rw-r----- 1 pipe pipe 68609570 Nov 23 23:04 CurrentCollectorMeterReadBackup20081123.tar.gz
-rw-r----- 1 pipe pipe 69937900 Nov 24 23:05 CurrentCollectorMeterReadBackup20081124.tar.gz
-rw-r----- 1 pipe pipe 70518963 Nov 25 23:05 CurrentCollectorMeterReadBackup20081125.tar.gz
-rw-r----- 1 pipe pipe 69788932 Nov 26 23:05 CurrentCollectorMeterReadBackup20081126.tar.gz
-rw-r----- 1 pipe pipe 70712364 Nov 27 23:04 CurrentCollectorMeterReadBackup20081127.tar.gz
-rw-r----- 1 pipe pipe 69530103 Nov 28 23:04 CurrentCollectorMeterReadBackup20081128.tar.gz
-rw-r----- 1 pipe pipe 69359582 Nov 29 23:04 CurrentCollectorMeterReadBackup20081129.tar.gz
-rw-r----- 1 pipe pipe 70377462 Nov 30 23:04 CurrentCollectorMeterReadBackup20081130.tar.gz
-rw-r----- 1 pipe pipe 71530553 Dec 1 23:05 CurrentCollectorMeterReadBackup20081201.tar.gz
-rw-r----- 1 pipe pipe 71315927 Dec 2 23:05 CurrentCollectorMeterReadBackup20081202.tar.gz
-rw-r----- 1 pipe pipe 71014908 Dec 3 23:05 CurrentCollectorMeterReadBackup20081203.tar.gz
-rw-r----- 1 pipe pipe 70006001 Dec 4 23:05 CurrentCollectorMeterReadBackup20081204.tar.gz
-rw-r----- 1 pipe pipe 72596207 Dec 5 23:05 CurrentCollectorMeterReadBackup20081205.tar.gz
-rw-r----- 1 pipe pipe 71755813 Dec 6 23:05 CurrentCollectorMeterReadBackup20081206.tar.gz
-rw-r----- 1 pipe pipe 71804873 Dec 7 23:05 CurrentCollectorMeterReadBackup20081207.tar.gz
-rw-r----- 1 pipe pipe 70321940 Dec 8 23:06 CurrentCollectorMeterReadBackup20081208.tar.gz
-rw-r----- 1 pipe pipe 71836264 Dec 9 23:05 CurrentCollectorMeterReadBackup20081209.tar.gz
-rw-r----- 1 pipe pipe 70717052 Dec 10 23:06 CurrentCollectorMeterReadBackup20081210.tar.gz
-rw-r----- 1 pipe pipe 73818543 Dec 11 23:05 CurrentCollectorMeterReadBackup20081211.tar.gz
-rw-r----- 1 pipe pipe 72596215 Dec 12 23:05 CurrentCollectorMeterReadBackup20081212.tar.gz
-rw-r----- 1 pipe pipe 71104767 Dec 13 23:05 CurrentCollectorMeterReadBackup20081213.tar.gz
-rw-r----- 1 pipe pipe 70855212 Dec 14 23:05 CurrentCollectorMeterReadBackup20081214.tar.gz
-rw-r----- 1 pipe pipe 87294203 Dec 15 23:07 CurrentCollectorMeterReadBackup20081215.tar.gz
ls -ltr CurrentCollectorMeterReadBackup20081020.tar.gz
-rw-r----- 1 pipe pipe 144570660 Oct 20 23:08 CurrentCollectorMeterReadBackup20081020.tar.gz
--------------------------------------------------------------------------
the problem is that in FTP is not recognising the value of $value as 1020
when using FTP -v it is showing
550 CurrentCollectorMeterReadBackup2008${value}.tar.gz: No such file or directory
I tried with both mget and get option
Last edited by ali560045; 12-16-2008 at 08:59 AM..
There is nothing wrong with the script version in Post #3. Note that the single quotes have been removed to allow expansion of ${value} .
The error message in Post #3 suggests that you have hit an old Linux bug in the FTP daemon. Either apply fixes or try specifying a directory name (with ./) on the mget line.
I have an for loop that reads the following file
cat param.cfg
val1:env1:opt1
val2:env2:opt2
val3:env3:opt3
val4:env4:opt4
.
.
The for loop extracts the each line of the file so that at any one point, the value of i is
val1:env1:opt1 etc...
I would like to extract each... (19 Replies)
Hello All,
I am trying to connect to ftp server and get the files. Also i need to rename the file in other ftp dir.
rename method is not allowing me to rename the file in other dir. When i tried copy command by using net::FTP:FILE then perl says it is not installed.
Can some body help me to... (2 Replies)
Dear All,
I am new to unix and I am trying to build a shell script which will connect to a different server by passing username and password from a file or command line but not manually...
In short I dont want to connect to a diff server via ftp interactively.
Any suggestion...looking... (8 Replies)
Hi all,
I'm using the following script to automated ftp files to 1 ftp servers
host=192.168.0.1
/usr/bin/ftp -vi >> $bkplog 2>&1 <<ftp
open $host
bin
cd ${directory}
put $files
quit
ftp
and the .netrc file contain
machine 192.168.0.1
login abc... (4 Replies)
Hi,
I have a ftp script which first gets all the file names and echo's the latest file.
I'm using another ftp command sets to get the file name given by first ftp. The problem is the parameter is not accepted by second ftp. The error message i'm getting is
> Rename Temp File calloc:ICMP... (5 Replies)
Hi,
We have some clients who will place huge files in to one of the remote server.
And the shell script written in our local server to retrieve client files (using FTP) placed on one of the remote server of ours by clients.
My question Is there any FTP command/script to check from my local... (1 Reply)
We are transferring file from mainframes to unix, & in FTP process itself we would like to set access rights for
unix machine.
Has anyone used chmod command in association with site command in ftp? How it should be used?
Thanks in advance. (1 Reply)
Hello,
A couple of times per week, i receive emails notifications when files are available for processing.
Currently i read these eamails with a java program and store the attachement on my C: drive and would now like to generate a PC script to send this file name up to UNIX-Solaris and... (3 Replies)
Hi
I have a question.
In the FTP script if we are passing all the required value like Hostname, username, password, Action(put or get), Filename, & mode(ascii or binary) through parameters then we have to pass these in the exact orders in which they are taken like if we defined Username=$2... (2 Replies)
Still a Beginner here ..
Does anyone no how to get the IP address of the machine thats logged in (bearing in mind there will be others logged in) while they are logged in to the Unix server and pass this as a variable to a shell script so as I can FTP files to that machine via a shell script, at... (2 Replies)