Dynamically ftp'ing a file


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Dynamically ftp'ing a file
# 1  
Old 09-02-2007
Dynamically ftp'ing a file

Hi,

I am having unix script that passes argument value to script. The script finds the file and keeps it in a directory.

I need to ftp this file to another server. Please guide me how to acieve this.

I am able to connect to ftp server but i am not able to use the unix argument in the ftp script as it is already ftp'ed in to another server.

Eg: Put /data/$1.bcp /data/bin/$1.bcp

it says that $1.bcp is not found as we cant use $1 once it is ftp'ed.

Steps that i am following in the Unix script:

1. ./unloadtable.bld order

This unloadtable.bld takes orders as a argument and searches that orders file and attaches .bcp to that orders. So it becomes orders.bcp.

2. We need to pass this orders.bcp to ftp.

I am calling another script in unloadtable.bld to ftp this file.

3. This subscript again calls another scripts that passes orders.bcp to that server.

I am having problem in the third step. Please help me out.

Thanks

Suresh
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

After Ftp'ing file to destination how to check the file if it is in correct ASCII and not corrupted

Hi Folks, While transferring file from FTP software like Filezilla the files gets corrupted. Is there any way I can check if the recently transferred file is in ASCII and not corrupted. I have tried using file -i filename command which does tell if the file character set is ASCII or binary... (6 Replies)
Discussion started by: Khan28
6 Replies

2. Shell Programming and Scripting

ftp'ing multiple files to the remote server

unix shell script (2 Replies)
Discussion started by: giridhar276
2 Replies

3. Shell Programming and Scripting

FTP'ing the zipped file

Hi, I need to have a shell script that FTP's a zipped file from a particular location. I have some path and inside that path i will have folders like x_timestamp and inside x_timestamp there may many folders based upon events like y_111,y_222,y_333.Inside each event there will be another... (3 Replies)
Discussion started by: weknowd
3 Replies

4. Shell Programming and Scripting

dynamically echo-ing parameters

I have file called vars that has the following init USER_DB="hello" USER_DB2="hello2" These are passwords I source vars . vars But I have a script that will cycle through several databases, but each has its own password. So I need to build my password parameter. . vars... (1 Reply)
Discussion started by: guessingo
1 Replies

5. Shell Programming and Scripting

grep'ing and sed'ing chunks in bash... need help on speeding up a log parser.

I have a file that is 20 - 80+ MB in size that is a certain type of log file. It logs one of our processes and this process is multi-threaded. Therefore the log file is kind of a mess. Here's an example: The logfile looks like: "DATE TIME - THREAD ID - Details", and a new file is created... (4 Replies)
Discussion started by: elinenbe
4 Replies

6. UNIX for Dummies Questions & Answers

FTP'ing EBCDIC Characters from Mainframe

Hi All, I am new to this site, I have a requirement where in i have to FTP a file from mainframe to Unix box. The catch here is there are few Spanish characters like N with tilde(~) and a with ` etc., all other characters are coming fine but those mentioned above are not coming in a proper... (1 Reply)
Discussion started by: harikiranr
1 Replies

7. Shell Programming and Scripting

size of a file that iam ftp ing

Hi, I want to compare the size of the files in my local machine before ftp ing it and the size of the file in the remote machine i.e after ftping . SO that the ftp is successful . (3 Replies)
Discussion started by: dineshr85
3 Replies

8. Shell Programming and Scripting

Help in FTP'ing multiple files

Hi, I have written the following FTP script to get the multiple files from remote server to local server. My problem is that 'mget *' is not working in the script. I also tried with 'mget *.txt', 'mget *.*' etc. without any success. It do not copy any file to local server. In the script, Prompt... (10 Replies)
Discussion started by: berlin_germany
10 Replies

9. Shell Programming and Scripting

FTP'ing files with filenames in mail messege

Hi, I have created the following FTP script, which transfers daily “.txt” files from remote server in to a timestamped folder on local server. Once all files are FTP'ed, it then deletes files from remote server. When files are FTP'ed, I get a mail messege like, “Files are successfully transfered”,... (1 Reply)
Discussion started by: berlin_germany
1 Replies

10. IP Networking

Ftp'ing thru a Iptables NAT Masquerade

Greetings to all. My new firewall is giving me one hell of a problem. I'm running iptables and masquerading my intranet thru NAT. But here is the problem. Whenever I try to FTP to a server outside of my lan I get a 500 illegal port error. I've come to the conclusion that NAT is... (2 Replies)
Discussion started by: phrater
2 Replies
Login or Register to Ask a Question
DPATCH(7)							      dpatch								 DPATCH(7)

NAME
debian/patches/script.dpatch - self applying patch SYNOPSIS
debian/patches/script.dpatch -patch [directory] debian/patches/script.dpatch -unpatch [directory] debian/patches/script.dpatch -pkg-custom [directory] DESCRIPTION
A dpatch is a program that modifies the source tree in a given directory. How it does that is entirely up to the person writing it. It can be a script that calls patch(1) with the appropriate options, a complicated perl script that does some deep magic, or anything else. The only requirement is that it MUST accept the -patch and -unpatch options, followed by the destination (or working) directory, when speci- fied. For the sake of compatibility, the second argument is only present when a working directory was explicitly set with dpatch --workdir. For some of the dpatch(1) features to work, the script should follow a common style: there should be a line near the top of the file with the following format: "filename -- author <email>". And one or more "# DP: description" lines. These will be used by dpatch cat for exam- ple. WARNING
dpatch is deprecated, please switch to the `3.0 (quilt)' Debian source package format instead. See http://wiki.debian.org/Projects/Deb- Src3.0#FAQ for a short guide on how to do it. EXAMPLES
One can find dpatch examples under /usr/share/doc/dpatch/examples/. AUTHOR
This manual page was written by Gergely Nagy. SEE ALSO
dpatch(1), dpatch.make(7), dpatch-edit-patch(1), dpatch-list-patch(1), dpatch-convert-diffgz(1) DPATCH 2 Dec 13 2011 DPATCH(7)