curtisb has asked for the wisdom of the Perl Monks concerning the following question:
what I'm trying to do is run the following:
#!/usr/bin/perl -w use strict; system("lsnrctl")<<"EOF"==0 or die "couldn't run listener control: $!" + ; status EOF
I already know that this is not right. What I want to do is run the lsnrclt command and have it do all the steps that I need before the EOF marker. Something like this:
#!/usr/bin/perl -w use strict; system("lsnrctl")<<"EOF"==0 or die "couldn't run listener control: $!" + ; set password set current_listener status EOF
------------------------------------------------
I just answered my own question
#!/usr/bin/perl -w use strict; my $command = <<EOF; lsnrctl set password 'oracle' set current_listener 'LISTENER' status EOF system($command)==0 or die "couldn't run listener control: $!" ;
thanks, Bobby
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Heredoc with system call
by Tanktalus (Canon) on Dec 18, 2008 at 04:54 UTC | |
by curtisb (Monk) on Dec 18, 2008 at 05:18 UTC | |
by graff (Chancellor) on Dec 18, 2008 at 05:56 UTC | |
by Anonymous Monk on Apr 22, 2019 at 09:15 UTC | |
by bliako (Abbot) on Apr 22, 2019 at 10:26 UTC | |
by Anonymous Monk on Apr 22, 2019 at 16:37 UTC | |
by bliako (Abbot) on Apr 22, 2019 at 18:03 UTC | |
by LanX (Saint) on Apr 22, 2019 at 10:56 UTC | |
Re: Heredoc with system call
by diotalevi (Canon) on Dec 18, 2008 at 04:53 UTC | |
by curtisb (Monk) on Dec 18, 2008 at 05:14 UTC | |
by diotalevi (Canon) on Dec 18, 2008 at 05:51 UTC | |
Re: Heredoc with system call
by Anonymous Monk on Dec 19, 2008 at 07:34 UTC |