From: Christoph S. <csc...@am...> - 2006-04-18 08:44:57
|
Hello Austin, first of all, thanks for your input. In Germany Friday and Monday were public holidays :)) hence I'm catching up now. exp...@li... wrote on 13-04-2006 18:33:30: > On Thu, Apr 13, 2006 at 04:59:38PM +0200, Christoph Schwaiger wrote: > > Hello, > > > > after looking some time into documentation about terminals and ttys, I'm > > still not any further. I guess I need help. > > > > In my setup I use expect to spawn shells (rsh to AIX), (ssh to Linux), to > > a lot of remote shells in parallel. So far so good, there is no problem > > with that. Only, when talking to something like 30 boxes, the connection > > closure takes a while, but OK, that's all. > > > > You could use scp/rcp to copy the files, then diff them. If you have > a bastion you can do ssh hostone 'scp hosttwo file .'; scp 'hostone file .', > or something of that nature. ssh/rsh/scp/rcp can be setup to allow automatic > login. > surely, that is possible without change to the ssh trusted environment, as I do rsh and ssh already without pw, the copy should work without change. (The setup for ssh, the /.ssh folder with the keys and authorized hosts is a bit of a pain when apache runs as nobody, as this user has no login and ~, but it works) The issue is, as I don't compare only files, but also command outputs (i.e. the content of a app shared mem segment, printed by appropriate app interface), I would need to: 1) use command to print output into a file locally, 2) copy the file over and 3) delete it there. This is possible, no doubt, but creates a new dependency a shell doesn't have: it needs a known fs (i.e. /tmp) to have free space left. Thus, I try to go for something else. > > > The thingy described before (called shiva) is called by another one called > > (egalite) to retrieve output from many hosts and compare the gathered > > files. My problem is when comparing files coming from AIX (5.2) boxes to > > files coming from Linux (suse 9.? on Itanium), that the diff doesn't match > > because TAB (x09) is translated on AIX boxes, but not on Linux. A hack > > would be to give diff the option to ignore whitespaces, but this will > > cause problems on another side, hence don't like it really. > > There is probably a setting to tell the aix tty not to do that. > `man stty` on the aix host. > alternatively you could translate the file using something like > uuencode, then decode on the local box and feed to diff. > The tty translation capabilities I checked as one of the first things, but the whole difference between them are the parameter ignpar and istrip which are deactivated on AIX, but activated on Linux (it seems like Linux uses the same settings here as "raw" on AIX). But this parameters are not related to tab translation for what I understand. All I was looking for was an obvious problem I overlooked (somebody else should have fallen over it by now), but it seems not to be the case. What I'll do then it probably letting the perl script doing the diff do some post processing to translate the tab. That seems to be at the moment the easiest thing to do. As far as I remember there is a comment saying something like at the end of character translaction lies madness - will see :) > > As I assume to talk to remote boxes of different types has probably done > > by somebody... (but if somebody has compared the output already?)... I > > hope that somebody has found a solution to this one already. That would be > > great! > > > > Otherwise, I guess a cat need to postprocess the output rather. That will > > do the trick too.. > > > > Thanks in advance. > > > > Christoph Schwaiger. > > > > PS: If somebody knows a good documentation covering the whole data path > > from the perl expect through the pseudo tty, to the process, to the > > remshell and so on...feel free to make me aware of it! > > Unix ptys are fairly widely documented, but I'm sure we could do > with a summary in the docs. > > Austin > Thanks a lot! Christoph Schwaiger > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss |