02-01-2008
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
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
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
3. Shell Programming and Scripting
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
4. Shell Programming and Scripting
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
5. UNIX for Dummies Questions & Answers
#######################################################################
#
#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
6. Shell Programming and Scripting
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
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
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
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
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
LEARN ABOUT DEBIAN
rabbitmq-server
RABBITMQ-SERVER(1) RabbitMQ Server RABBITMQ-SERVER(1)
NAME
rabbitmq-server - start RabbitMQ AMQP server
SYNOPSIS
rabbitmq-server [-detached]
DESCRIPTION
RabbitMQ is an implementation of AMQP, the emerging standard for high performance enterprise messaging. The RabbitMQ server is a robust and
scalable implementation of an AMQP broker.
Running rabbitmq-server in the foreground displays a banner message, and reports on progress in the startup sequence, concluding with the
message "broker running", indicating that the RabbitMQ broker has been started successfully. To shut down the server, just terminate the
process or use rabbitmqctl(1).
ENVIRONMENT
RABBITMQ_MNESIA_BASE
Defaults to /var/lib/rabbitmq/mnesia. Set this to the directory where Mnesia database files should be placed.
RABBITMQ_LOG_BASE
Defaults to /var/log/rabbitmq. Log files generated by the server will be placed in this directory.
RABBITMQ_NODENAME
Defaults to rabbit. This can be useful if you want to run more than one node per machine - RABBITMQ_NODENAME should be unique per
erlang-node-and-machine combination. See the clustering on a single machine guide[1] for details.
RABBITMQ_NODE_IP_ADDRESS
By default RabbitMQ will bind to all interfaces, on IPv4 and IPv6 if available. Set this if you only want to bind to one network
interface or address family.
RABBITMQ_NODE_PORT
Defaults to 5672.
OPTIONS
-detached
start the server process in the background
SEE ALSO
rabbitmq-env.conf(5) rabbitmqctl(1)
EXAMPLES
rabbitmq-server -detached
Runs RabbitMQ AMQP server in the background.
AUTHOR
The RabbitMQ Team <info@rabbitmq.com>
NOTES
1. clustering on a single machine guide
http://www.rabbitmq.com/clustering.html#single-machine
RabbitMQ Server 06/22/2012 RABBITMQ-SERVER(1)