I need a little bit of help from you. I have a similar task, well maybe not. Anyway. I have a list of files that I need to get from an ftp server. I cannot figure out how to parse that list and have it read into my ftp script. Your script is the closest that I have come to finding the answer, but I am not clear on how to actually make this work. I have tried a loop, but seeing that I am already inside of the ftp code block when I try this:
while read line; do "$file"; done < <(cat filename.txt)
My script works fine if I want to download 1 file at a time, but I have about 35 specific files that need to be downloaded.
I am truly lost, please help me if you can. I hope this is clear, I have been out of the industry for 2 yeas and i am just getting back into the saddle, Im a bit rusty.
Thanks in advance.
Quote:
Originally Posted by bbabr
That did the job!
I managed to get the file list, create the todo.lst and run it. One thing I found, though, is that you have to delete the todo.lst after running the script. If not, the next time you run it, it will append to the file.
Below is the script I have. Any comments and suggestions on making it better would be greatly appreciated.
Dears,
I have a listfile contains list of files path.
i need to read the line of the listfile
mv the file to other directory
and update the listfile by deleting the lines of the listfile.
#!/bin/bash
target=/fstest/INVESTIG/Sadiq/TEST_ARCH
while read -r line || ];
do
mv $line... (19 Replies)
Below is my script code.which shows the environment name and then fetch the file from the ftp server but I am facing one issue.The script should be run in both way.We can pass the arguments with script and select the environment name then file name.Here the issue is I am not able to list the files... (1 Reply)
Hello, I have a text file name "filelist" which stores the file names of the files I want to move (the file names does not include the directory).
Each of the name is in 1 line, and all the file are in directory: /cluster/home/input (along with other unrelated files). I want to move all the... (7 Replies)
hi,
when i do ftp from unix to laptop which is running a windows os, it lands in a root folder.
can i move a file from this root ftp folder to any other location in my laptop
say , c:\files\ folder?
i used rename command inside ftp , but it says incorrect parameter. (5 Replies)
Hi,
Anybody help me to write a Shell Script
Get the latest file from the file list based on created and then move to the target directory.
Tried with the following script: got error.
A=$(ls -1dt $(find "cveit/local_ftp/reflash-parts" -type f -daystart -mtime -$dateoffset) | head... (2 Replies)
I have two files. The first containing a header and six columns of data.
Example file 1:
Number SNP ID dbSNP RS ID Chromosome Result_Call Physical Position
787066 SNP_A-8575395 RS6650104 1 NOCALL 564477
786872 SNP_A-8575125 RS10458597 1 AA ... (13 Replies)
Hi All
I need to move the older than 30 days file to another ftp server. I have source structure like this
Files folder
Folder1
Folder2
Folder3
I need to create same Target structure and I need to move the older than 30 day file to another ftp server, can you please suggest me how I develop... (1 Reply)
Hi All,
I have the following code in one of my xml file:
<com:parameter>
<com:name>secretKey</com:name>
<com:value>31XA874821172E89B00B1C</com:value>
</com:parameter>
<com:parameter>
<com:name>tryDisinfect</com:name>
<com:value>false</com:value>
</com:parameter>
<com:parameter>... (4 Replies)
Hi Experts,
I am using below script and facing some problems..
cd /home/user/test
rm ftp://ftp.log
Example: A_Bachfile_09292011.txt
A=`ls -1 "A*.txt"`
compress $A
C=`ls -1 "A*`
hostname="test.gmail.com"
user="raju"
Password="******"
ftp -n $hostname <<EOF >>ftp.lpg... (4 Replies)
I have a file --> file1.txt
i need to copy this file to another server using FTP....the 2 servers are server1 and server2..may i know how to write a script that can do this?
thanks in advance! Im a newbie to this... (4 Replies)