plz help me by creating required shell script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting plz help me by creating required shell script
# 1  
Old 02-01-2008
Java plz help me by creating required shell script

Dear all

I am new to shell script. And this is my first post to this site as well as this forum. I would like to tell this forum that I require shell script, which is regarding transfers of files from a specific directory in a server A to server B on a specific directory through sftp command. Shell script should also required two things like first one is, at file level it should check bytes related to that file on server A, after transfer of that file on server B , it should have the same number of bytes as on server A, if the size does'nt match then it should repull that file from server A to Server B. For e.g if a file name f1 having 2000 bytes on server A, after transfer of that file on server B, it should have 2000 bytes on server B also, if the size does'nt match then it should repull that file from server A to Server B. And the second requirement in that shell script is that suppose there are 1000 files in server A in a particular directory, after transfer of those files to server B it should check that 1000 fiadles are tranfer to Server B if the connection is break during transfer then it should retransfer those files to server B which are not present on server B but are present on server A or retransfer all the 1000 files to server B again.

Shell script require proper logging like if transfer not happen then it should write to a file that tranfers not being able to done properly and vice versa. Shell script should pickup the password or passphares from a file called 'pass' while during running of the script. A source or destination path of the server in a shell script, should be change by putting the path in a simple file called 'dest_path' or 'sour_path' file.

Well I am writing the details of Source server & Destination server details

SOURCE SERVER

Solaris OS, HostName is CCSS1,IP is 192.168.11.1 ,Path is /opt/home/peri/NORTH/MIS-CCSS

DESTINATION SERVER

Window OS, HostName is CFS,IP is 192.168.11.2 , Path is C:\Program Files \openSSH\NOT_MIS\Incoming\CCSS\NORTH
Autossh is not there.

While transfering files from solaris server to windows server , we have to create a log of the names & bytes of all files which have been properly transfer or how many files have been properly transfer before broken down of network. Sftp should be done in binary mode. Plz use only general command which I can execute it on sun solaris server.

I want to thanks to this forums in advance
# 2  
Old 02-01-2008
Thats all you want? It sounds like it's time to hire a programmer. Look into rsync: rsync
# 3  
Old 02-04-2008
Dear Kevin

I cann't use rsync as i have to run this shell script in only ssh enviorment.
If you could tell me how to compare bytes after passing the file from solaris boxes to window server then i would be greatedful for that

kind regards
# 4  
Old 02-04-2008
Sorry, your requirements are out of my range of knowledge and experience. Hopefully someone else will have a suggestion. I suggest you narrow down the scope of your problem though to a question or two that is easily answered on a help forum like this. The number of replies you get goes down exponentially the longer and more convoluted your question is.

Good luck.
# 5  
Old 02-04-2008
Quote:
Originally Posted by girish.batra
Dear Kevin

I cann't use rsync as i have to run this shell script in only ssh enviorment.
If you could tell me how to compare bytes after passing the file from solaris boxes to window server then i would be greatedful for that

kind regards
Have you started scripting anything? Honestly, it sounds like you
may need to hire someone ... it sounds like you need quite a bit
of stuff there.

G
# 6  
Old 02-05-2008
Thanks for the suggestion but I need to do it my self or take somebody's help.

kind regards
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

error in shell script while returning values-- urgent issue plz help.

Hi, I have initailized a varaible EBID as typeset Long EBID=0 i am calculating value of EBID using certian formula as below: (( CURR_EBID= ($BANDINDEX << 27) | ($CURR_FREQ << 16) | ($CURR_CELLID << 4) | $CURR_SECTOR_VALUE )) return $CURR_EBID The output is as below: + (( CURR_EBID=... (6 Replies)
Discussion started by: kasanur
6 Replies

2. Shell Programming and Scripting

Help required for creating script.

I want to create a shell script which should be doing following things .. i have the commands but do not know how to tie them up together. 1. . Go to a pre-defined directory and look for a specific pattern txt files like abc12* and select the latest file with abc12* ls |awk '{if($NF... (4 Replies)
Discussion started by: fugitive
4 Replies

3. Shell Programming and Scripting

plz help normal doubt abt shell script

How to print a only files and not directories in a path. for exam :a user consists both files and directoris in his path. i have to write a script to display only files not dirctories. and only dirctories not files. Advance thanks to forum members.:) (5 Replies)
Discussion started by: sivaranga001
5 Replies

4. Shell Programming and Scripting

i'm new to shell can handle this script for me plz

Write a shell script named displayargs that prints FOUR lines. The first line tells the name that was used to invoke the script, the second line tells how many parameters there were, the third line tells what the last parameter was, and the fourth line tells what the first parameter was. For... (8 Replies)
Discussion started by: kedah160
8 Replies

5. Shell Programming and Scripting

Help required in creating a shell script that filters the unwanted pattern

Kindly help, Suppose i am having a file that has got the following contents. Is there any way (eg. sed command) to remove the (*) (*any number) pattern. se.bas tulf.h (1) tuna.c (1) tunsim.c (1) tus.cpp (1) vp.c (1) vp.h (1) vpi. (1) (1 Reply)
Discussion started by: frozensmilz
1 Replies

6. UNIX for Dummies Questions & Answers

Shell Script Help Plz

####################################################################### # #This script will perform the menu such as : list file, change catalog, #file check, # #This script was written in UNIX Shell Programming Language #... (3 Replies)
Discussion started by: shekhani
3 Replies

7. Shell Programming and Scripting

Shell script help required

Hi, Can someone help me with this small piece of code. DIRNAME=$(dirname $0) BASENAME=$(basename $0) DATA="${DIRNAME}/${BASENAME}.data" && . $DATA whats is meant by && . $DATA here... Regards, Abhishek (2 Replies)
Discussion started by: max29583
2 Replies

8. Shell Programming and Scripting

Plz correct my syntax of shell script

Dear all I am still bit new in shell script area.I am writing down a shell script which I guess somewhere wrong so please kindly correct it. I would be greatful for that. What I actually want from this shell script is that it will move all the files one by one to another server which can be... (2 Replies)
Discussion started by: girish.batra
2 Replies

9. Shell Programming and Scripting

shell script to call other files..plz help

Hi all, I have a number of shell script,perl script.. etc in a directory,which i need to execute in some order.Now i need to create a script to call all these files in that order..so that the new script will execute all the files one by one....plz help this is urgent. Thanks In advance Anju (3 Replies)
Discussion started by: anju
3 Replies

10. Shell Programming and Scripting

Shell script to find out 2 last modified files in a folder..PLZ HELP!!!!!!!!!

hi all, I need to find out the last 2 modified files in a folder.There is some way by which,we can check the timestamp and find out..??please help this is urgent. Thanks in Advance Anju (3 Replies)
Discussion started by: anju
3 Replies
Login or Register to Ask a Question