03-31-2006 06:49 AM
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?
03-31-2006 06:57 AM
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
-- Rod Hills
03-31-2006 07:13 AM
Here is the link to the software porting and archive center-
-- Rod Hills
03-31-2006 07:24 AM
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.
04-01-2006 09:28 AM
It certainly is a novel way to use <() handles :) But I wasn't aware that it existed in shells other than 'bash'.
04-01-2006 10:06 PM
The <() syntax you're using is for the bash shell - see http://www.gnu.org/software/bash/manual/bashref.ht
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/displayPr
-> (11i v2 only) Internet Express - http://h20293.www2.hp.com/portal/swdepot/displayPr
-> (all versions 11i) HP-UX Porting Archive - http://hpux.connect.org.uk/hppd/hpux/Shells/bash-3