From: Loo, P. # P. <Pet...@so...> - 2006-10-05 18:29:32
|
Jdb, Sorry about that, I finally realize what you were talking about. The PARFILE. Of course, how can I have forgotten this. Thanks a lot. =20 Peter -----Original Message----- From: exp...@li... [mailto:exp...@li...] On Behalf Of Loo, Peter # PHX Sent: Thursday, October 05, 2006 8:52 AM To: Blackstone, J. David; exp...@li... Subject: Re: [Expectperl-discuss] Expect->spawn('sqlldr' The problem here is I want to hide my password from ps -ef command. I guess I am not understanding your question. =20 Peter -----Original Message----- From: Blackstone, J. David [mailto:jda...@ci...] Sent: Thursday, October 05, 2006 8:31 AM To: Loo, Peter # PHX; exp...@li... Subject: RE: [Expectperl-discuss] Expect->spawn('sqlldr' Is there a reason you need to use Expect for this? Why not create your input file and control file and then just execute sqlldr with "system"? jdb ________________________________ From: exp...@li... [mailto:exp...@li...] On Behalf Of Loo, Peter # PHX Sent: Wednesday, October 04, 2006 17:30 To: exp...@li... Subject: [Expectperl-discuss] Expect->spawn('sqlldr' =09 =09 Hello All, =20 I am attempting to use Expect to spawn "sqlldr" then feeding it the data returned from a SELECT statement. Everything appears to work except nothing is getting loaded. The reason I chose to use Expect.pm is to hide the "password" from the Unix command "ps -ef". Below is what I am trying to do. I hope you can help shed some light. =20 my $sqlldr =3D new Expect; =20 $sqlldr->spawn('sqlldr', join('@', $DBUSER, $s_dbName)) || die "Cannot spawn sqlplus: $!\n"; =20 $sqlldr->expect(30, ['control =3D ', sub { my $self =3D shift; =09 $self->send("$cntrlFile\n"); $self->expect(0, '-re', "\n"); } ] ); =09 #$self->log_stdout(0); =09 #$self->log_stdout(1); =20 $sqlldr->expect(30, ['Password:', sub { my $self =3D shift; =09 $self->send("$DBPASS\n"); $self->expect(0, '-re', "\n"); } ] ); =20 while ($row =3D $s_sth->fetchrow_arrayref()) { my $rec =3D join($delimiter, @$row); #$sqlldr->send("$rec\n") || die "ERROR: Cannot send to sqlldr: $!\n"; $sqlldr->expect(0, '', sub { my $self =3D shift; $self->send("$rec\n"); } ); } =20 Thanks. =20 Peter This E-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply E-mail, and destroy all copies of the original message. ------------------------------------------------------------------------ - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDE V _______________________________________________ Expectperl-discuss mailing list Exp...@li... https://lists.sourceforge.net/lists/listinfo/expectperl-discuss This E-mail message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply E-mail, and destroy all copies of the original message. |