- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ksh script Agian !!
Operating System - HP-UX
1752781
Members
6301
Online
108789
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2009 03:02 AM
05-28-2009 03:02 AM
Dear my friends,
Dear my friends,
I have below script:
if [ "$x" != "0" ]; then
cat $y | while read LINE
do
is_ok=1
until [ $is_ok -eq 0 ]; do
cp -p $z${LINE} /eva/bulk/tmp/${LINE}
cmp -s $z${LINE} /eva/bulk/tmp/${LINE}> /dev/null
is_ok=$?
done
is_ok=1
until [ $is_ok -eq 0 ]; do
rm -f /eva/bulk/tmp/${LINE}.gz
usr/contrib/bin/gzip /eva/bulk/tmp/${LINE}
is_ok=$?
done
MD5A=$(md5sum /eva/bulk/tmp/${LINE}.gz | cut -c 1-32)
MD5B="0"
until [ "$MD5A" = "$MD5B" ]; do
remsh remserver -l root -n rm -f /cx/arc/${LINE}.gz
rcp -p /eva/bulk/tmp/${LINE}.gz remserver:/cx/arc/${LINE}.gz
MD5B=$(remsh remserver -l root -n md5sum /cx/arc/${LINE}.gz|cut -c 1-32)
MD5A=$MD5B?
done
done
else echo "There are no files to be copied................."
fi
How to check so the last looping (rcp) has match the test value (MD5A=MD5B).Because my above script still looping and the check does not work.Thanks in advanced.
Dear my friends,
I have below script:
if [ "$x" != "0" ]; then
cat $y | while read LINE
do
is_ok=1
until [ $is_ok -eq 0 ]; do
cp -p $z${LINE} /eva/bulk/tmp/${LINE}
cmp -s $z${LINE} /eva/bulk/tmp/${LINE}> /dev/null
is_ok=$?
done
is_ok=1
until [ $is_ok -eq 0 ]; do
rm -f /eva/bulk/tmp/${LINE}.gz
usr/contrib/bin/gzip /eva/bulk/tmp/${LINE}
is_ok=$?
done
MD5A=$(md5sum /eva/bulk/tmp/${LINE}.gz | cut -c 1-32)
MD5B="0"
until [ "$MD5A" = "$MD5B" ]; do
remsh remserver -l root -n rm -f /cx/arc/${LINE}.gz
rcp -p /eva/bulk/tmp/${LINE}.gz remserver:/cx/arc/${LINE}.gz
MD5B=$(remsh remserver -l root -n md5sum /cx/arc/${LINE}.gz|cut -c 1-32)
MD5A=$MD5B?
done
done
else echo "There are no files to be copied................."
fi
How to check so the last looping (rcp) has match the test value (MD5A=MD5B).Because my above script still looping and the check does not work.Thanks in advanced.
Solved! Go to Solution.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2009 03:17 AM
05-28-2009 03:17 AM
Solution
Hi,
you can go on from previous thread.
as answer you don't need MD5A=$MD5B? in loop. remove it.
in loop you copy the file and get the checksum. and if local and remote are same exit the loop. so you must compare local and remote file cheksum( MD5A and MD5B)
you can go on from previous thread.
as answer you don't need MD5A=$MD5B? in loop. remove it.
in loop you copy the file and get the checksum. and if local and remote are same exit the loop. so you must compare local and remote file cheksum( MD5A and MD5B)
Computers have lots of memory but no imagination
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP