- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Script question
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО03-19-2007 02:14 AM
тАО03-19-2007 02:14 AM
Script question
thanks,
hunki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2007 02:19 AM
тАО03-19-2007 02:19 AM
Re: Script question
after statement with "rcp" test the comand with
lines like this :
if [[ ${?} -eq 0 ]]
then
echo "remote copy OK"
else
echo "remote copy KO"
fi
hth
regards
pg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2007 02:19 AM
тАО03-19-2007 02:19 AM
Re: Script question
When the copy is complete, you can run "cksum" command against the source and target files and compare the output.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2007 02:20 AM
тАО03-19-2007 02:20 AM
Re: Script question
Check this thread:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1096387
my post with the checksum part.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2007 03:26 AM
тАО03-19-2007 03:26 AM
Re: Script question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2007 04:58 AM
тАО03-19-2007 04:58 AM
Re: Script question
For example, an ascii file copied to windows is going to result in a different size and different chksum simply because of CR -vs CR/LF issues.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2007 05:43 AM
тАО03-19-2007 05:43 AM
Re: Script question
Exmaple :
rcp host:/tmp/abc .
#Need to verify here with an output message.
# and then continue with next rcp.
rcp host:/tmp/xyz .
Please suggest.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2007 05:47 AM
тАО03-19-2007 05:47 AM
Re: Script question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-19-2007 06:30 AM
тАО03-19-2007 06:30 AM
Re: Script question
a kind of 'brute solution' is to transfer the file back again and do a local check:
flist='f1 f2 ...'
rm -f tmpfile$$
for fil in $flist
do
if rcp $fil remhost:/path/name
then
if rcp remhost:/path/name/${fil##*/} tmpfile$$
then
if cmp -s $fil tmpfile$$
then :
else print -u2 file $fil with verify error; break
fi
else print -u2 file $fil with get error; break
else print -u2 file $fil with put error; break
fi
done
rm -f tmpfile$$
mfG Peter