There is no prompt being printed between two prints. So it means/proves that the prompt is NOT THERE, doesn't matter what it is, but I do like tye's suggestion, it is 100% logical.#!/usr/bin/perl use IPC::Open2; use strict; my ($reader, $writer); my $pid = open2($reader, $writer, "sh") || die "failed"; print $writer "history\n"; my $buffer; sysread($reader, $buffer, 4000); print "[", $buffer, "]\n"; print $writer "ls\n"; sysread($reader, $buffer, 4000); print "[", $buffer, "]\n";
In reply to Re: (Expect) Re: question for open2, and by the way, resolves an old thread
by pg
in thread question for open2, and by the way, resolves an old thread
by pg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |