- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Using ssh with diff
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
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-31-2006 06:49 AM
тАО03-31-2006 06:49 AM
Using ssh with diff
I have existing scripts on a sco system here that pull and push files to a dmz'd ftp server. I'm moving the scripts to an hp 11.11 box and have syntax problems with one of the lines:
`diff -b <(ssh dmz_host ls -l /path/to/user/from) <(ls -l /path/to/user/outgoing)>/dev/null`
This command compares the the output of listing both the remote dir. and local dir. I've tried various combinations but can get nothing to work. What am I missing?
Thanks,
Eric
- Tags:
- ssh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2006 06:57 AM
тАО03-31-2006 06:57 AM
Re: Using ssh with diff
Usually I would copy the listings locally, then do the diff. Example-
ssh dms_host ls -l /path/to/user/from >/tmp/temp1
ls -l1 /path/to/user/outgoing >/tmp/temp2
diff -b /tmp/temp1 /tmp/temp2
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2006 07:13 AM
тАО03-31-2006 07:13 AM
Re: Using ssh with diff
Here is the link to the software porting and archive center-
http://hpux.cs.utah.edu/hppd/hpux/Networking/Admin/rsync-2.6.4/
HTH
-- Rod Hills
- Tags:
- rsync
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2006 07:24 AM
тАО03-31-2006 07:24 AM
Re: Using ssh with diff
Maybe we can skip the critical opinions in the future? I didn't post the whole script because there wasn't a need to. I'm using rsync with ssh to pull files from a dmz server. rsync does not handle partial files well and there's a real potential with that in this case.
Thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2006 09:28 AM
тАО04-01-2006 09:28 AM
Re: Using ssh with diff
It certainly is a novel way to use <() handles :) But I wasn't aware that it existed in shells other than 'bash'.
- Tags:
- bash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2006 10:06 PM
тАО04-01-2006 10:06 PM
Re: Using ssh with diff
The <() syntax you're using is for the bash shell - see http://www.gnu.org/software/bash/manual/bashref.html#SEC32 for what this syntax means.
Rather than trying to fix the syntax, you could just get bash for HP-UX, at any of the following locations:
-> (11i v1 only) Linux Porting Kit - http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B9891AA
-> (11i v2 only) Internet Express - http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXIEXP1123
-> (all versions 11i) HP-UX Porting Archive - http://hpux.connect.org.uk/hppd/hpux/Shells/bash-3.00.16/
Good luck!