11-02-2009
Need Some Logic Help in File transfer from one directory to another directory in UNIX
Hi,
I have to transfer five files from one directory to another directory in unix with the help of shell scripts. This shell script calling the param file as input parameter. Every day one file will come and fall on my source directory. Remaining files will fall on any one of the day of the month. My existing script will transfer on every day. Proposed system will transfer the file on cyclic base (whenever the four files fall on my source directory). I can't specify the those four files name on my script because this script for generic purpose. I am giving the sample data of my param file below
n1 N1.filename1 data01 N1.filename1
n1 N1.filename2 data01 N1.filename2
n1 N1.filename3 data01 N1.filename3
n1 N1.filename4 data01 N1.filename4
n1 N.dailyfile data01 N.dailyfile
How can i achive the transfer. Can u help me.
Thanks,
A. Easter raj
Last edited by easterraj; 11-02-2009 at 11:44 AM..
Reason: not so clear
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm a real newbie, and I'm stuck trying to ftp download a directory and all contained files/directories. I'm using mget but I have to create all the directories locally first (pain). How else can I do it withing the ftp command.
Apologies for sound stupid but we all gotta start somewhere.
... (2 Replies)
Discussion started by: ian
2 Replies
2. UNIX for Dummies Questions & Answers
Any body any ideas i'm failry new to this so any help would be appreciated.
Cheers
Steve (2 Replies)
Discussion started by: gleads
2 Replies
3. IP Networking
Hi
I can transfer a single file and multiple file from unix to widows using get and mget command.But i dont know How to transfer a whole directory from unix to windows using command.
pls help me
Ramkumar (1 Reply)
Discussion started by: ramkumarm83
1 Replies
4. Shell Programming and Scripting
Move a file from windows directory to unix directory, is this possible?
if it is, can someone help me on this?
Thanks! God bless! (1 Reply)
Discussion started by: kingpeejay
1 Replies
5. Shell Programming and Scripting
Hi,
How do i check if I have read/write/execute rights on a UNIX directory?
What I'm doing is checking read access on the files but i also want to check if user has rights on the direcory in whcih these files are present.
if then......
And I check if the directory exists by using... (6 Replies)
Discussion started by: chetancrsp18
6 Replies
6. UNIX for Dummies Questions & Answers
Dear Friends,
How to transfer files from my local PC to Unix directory without using FTP.
Scenario: Transfer/Upload a file from PC to unix using web browser without using FTP technologies. I heard something like sendunix and sendpc used to transfer files from unix to Desktop and... (1 Reply)
Discussion started by: kk_c2il2
1 Replies
7. Shell Programming and Scripting
got it figured out :) (1 Reply)
Discussion started by: sHockz
1 Replies
8. Shell Programming and Scripting
Dear All,
i am trying to get the file from windows location to unix location without using FTP and neither thru entering the user id and password. I have one unix form which is running on web application and user is entering the location and file name there now i know the file name and path. So i... (8 Replies)
Discussion started by: ripudaman.singh
8 Replies
9. UNIX for Dummies Questions & Answers
My input is as below :
/splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt
/splunk/scrubbed/rebate/IFIND.REBTE.WROC.txt
/splunk/scrubbed/loyal/IFIND.HELLO.WROC.txt
/splunk/scrubbed/triumph/ifind.triumph.txt
From the above input I want to extract the file names only .
Basically I want to... (5 Replies)
Discussion started by: IshuGupta
5 Replies
10. Shell Programming and Scripting
I need a script which should watch a directory for a file with specific directory.
If it finds a file in directory, it should search for few specific keyword in the file. if the keyword exists, it should trim string from specific column.
The file should be moved to another directory and the a... (8 Replies)
Discussion started by: akashdeepak
8 Replies
diff3(1) User Commands diff3(1)
NAME
diff3 - 3-way differential file comparison
SYNOPSIS
diff3 [-exEX3] filename1 filename2 filename3
DESCRIPTION
diff3 compares three versions of a file, and publishes disagreeing ranges of text flagged with these codes:
==== all three files differ
====1 filename1 is different
====2 filename2 is different
====3 filename3 is different
The type of change suffered in converting a given range of a given file to some other is indicated in one of these ways:
f : n1 a Text is to be appended after line number n1 in file f, where f = 1, 2, or 3.
f : n1 , n2 c Text is to be changed in the range line n1 to line n2. If n1 = n2, the range may be abbreviated to n1.
The original contents of the range follows immediately after a c indication. When the contents of two files are identical, the contents of
the lower-numbered file is suppressed.
The following command will apply the resulting script to filename1.
(cat script; echo '1,$p') | ed - filename1
OPTIONS
-e Produce a script for the ed(1) editor that will incorporate into filename1 all changes between filename2 and filename3 (that is,
the changes that normally would be flagged ==== and ====3).
-x Produce a script to incorporate only changes flagged ====.
-3 Produce a script to incorporate only changes flagged ====3.
-E Produce a script that will incorporate all changes between filename2 and filename3, but treat overlapping changes (that is,
changes that would be flagged with ==== in the normal listing) differently. The overlapping lines from both files will be inserted
by the edit script, bracketed by <<<<<< and >>>>>> lines.
-X Produce a script that will incorporate only changes flagged ====, but treat these changes in the manner of the -E option.
USAGE
See largefile(5) for the description of the behavior of diff3 when encountering files greater than or equal to 2 Gbyte ( 2**31 bytes).
FILES
/tmp/d3*
/usr/lib/diff3prog
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|Availability |SUNWesu |
|CSI |enabled |
+-----------------------------+-----------------------------+
SEE ALSO
diff(1), attributes(5), largefile(5)
NOTES
Text lines that consist of a single `.' will defeat -e.
Files longer than 64 Kbytes will not work.
SunOS 5.10 14 Sep 1992 diff3(1)