The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Shell Script Required? Pls. help me ntgobinath Shell Programming and Scripting 22 05-29-2008 04:09 AM
Shell Script Required ntgobinath Shell Programming and Scripting 3 05-06-2008 10:04 AM
Shell Script Required! vats Shell Programming and Scripting 3 08-27-2007 11:29 PM
shell script required sethunath Linux 1 07-07-2007 02:04 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-01-2008
Registered User
 

Join Date: Jan 2008
Posts: 51
Post 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
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 02-01-2008
Registered User
 

Join Date: Jan 2008
Posts: 309
Thats all you want? It sounds like it's time to hire a programmer. Look into rsync: rsync
Reply With Quote
  #3 (permalink)  
Old 02-04-2008
Registered User
 

Join Date: Jan 2008
Posts: 51
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
Reply With Quote
  #4 (permalink)  
Old 02-04-2008
Registered User
 

Join Date: Jan 2008
Posts: 309
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.
Reply With Quote
  #5 (permalink)  
Old 02-04-2008
Registered User
 

Join Date: May 2002
Posts: 62
Quote:
Originally Posted by girish.batra View Post
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
Reply With Quote
  #6 (permalink)  
Old 02-04-2008
Registered User
 

Join Date: Jan 2008
Posts: 51
Thanks for the suggestion but I need to do it my self or take somebody's help.

kind regards
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:16 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0