[olug] Trapping Strange Output

Ted Kat. dark_house_666 at yahoo.com
Thu Apr 1 18:33:50 UTC 2004


This might not help but maybe shell magic is the problem.
How about single ( ' ) instead of double ( " )

Ted.

--- Joe Catanzaro <joecatanzaro at cox.net> wrote:
> I'm trying to trap the output of the following command.
> 
> ssh -l user1 box1 -o BatchMode=yes ". /export/home/user1/.profile
> 2>&1 
> 1>/dev/null;.
> /home/superuser/fixer/sync.user1.env;/home/superuser/fixer 
> 78758000002063 002 X"
> 
> When I run the command by itself, outside of ssh, the results are as 
> follows, which is exactly what I want:
> 
> user1 > . /export/home/user1/.profile 2>&1 1>/dev/null;. 
> /home/superuser/fixer/sync.user1.env;/home/superuser/fixer/fixer 
> 78758000002063 002 X
> GETTING CCWO DATA . . .
> PACKING GETAD DATA . . .
>     sp [124]
>     obj_count [61]
>     data
> [640023710002374000078758000002063002000000000000000000000000000]
> (FLDID(3))      0
> (FLDID(33554436))       9
> (FLDID(201326597))      238\1f0\1f0\1f0\1f\1f0\1f100\1f0\1f0\1f
> 
> Segmentation Fault(coredump)
> 
> But when I run it through ssh, it doesn't return any output. Here are
> the 
> following variations that I've tried and each time I get nothing.
> 
> ssh -l user1 box1 -o BatchMode=yes ". /export/home/user1/.profile
> 2>&1 
> 1>/dev/null;.
> /home/superuser/fixer/sync.user1.env;/home/superuser/fixer 
> 78758000002063 002 X 2>&1"     # Trapping both STDERR and STDOUT
> 
> ssh -l user1 box1 -o BatchMode=yes ". /export/home/user1/.profile
> 2>&1 
> 1>/dev/null;.
> /home/superuser/fixer/sync.user1.env;/home/superuser/fixer 
> 78758000002063 002 X 2>/dev/null"     # Trapping STDOUT and dumping
> STDERR
> 
> ssh -l user1 box1 -o BatchMode=yes ". /export/home/user1/.profile
> 2>&1 
> 1>/dev/null;.
> /home/superuser/fixer/sync.user1.env;/home/superuser/fixer 
> 78758000002063 002 X 2>&1 1>/dev/null"      # Trapping STDERR and
> dumping 
> STDOUT
> 
> ssh -l user1 box1 -o BatchMode=yes ". /export/home/user1/.profile
> 2>&1 
> 1>/dev/null;.
> /home/superuser/fixer/sync.user1.env;/home/superuser/fixer 
> 78758000002063 002 X 3>&1 1>&2 2>&3 3>&-"      # Exchanging STDERR
> and STDOUT
> 
> I'm at a loss. Any input would be very appreciated.
> 
> Thanks,
> 
> 
> Joe Catanzaro
> joecatanzaro at cox.net  
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> http://lists.olug.org/mailman/listinfo/olug


__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/


More information about the OLUG mailing list