Ask a Question related to Perl / CGI, Design and Development.
-
kderaedt #1
Execute shell script from a perl script
Hi,
How can I executed a Unix shell script from a Perl script.
The shell script is a dump of a oracle table to a file. The perl script is
for the reformat of this output file.
Thanks
Karel
kderaedt Guest
-
variable to a shell-script
hello, i've got really problems transporting a form-variable (called searchstring) to a shellscript :-/ because of a blank in the searchstring... -
Shell script question
Hi, I am trying to run one of my installation shell script using the command- bash resetapp.sh & it gives me the error as- 'bash: not... -
shell script help!!
hi all, i have some commands on hand, but i don't know how i can stick it up with (ksh) shell script... can anyone help? 1) use find to list... -
[OT] How do I execute script in different shell?
Hi, Sorry to post an off topic question, but it's a quick one, hope you can help. Say I have a shell script shell.sh: $!/bin/sh echo $SHELL -
How do i include a shell script
How do i include a shell script in perl. I have to use some shell scripts in a perl script. I know I can write it in perl, but would like avoid... -
J. Gleixner #2
Re: Execute shell script from a perl script
J. Gleixner wrote:
Or if your perl script takes input from STDIN, and you modified your> kderaedt wrote:
>>>> Hi,
>>
>> How can I executed a Unix shell script from a Perl script.
>> The shell script is a dump of a oracle table to a file. The perl
>> script is
>> for the reformat of this output file.
> perldoc -f system
>
shell script to echo to STDOUT, no need to call system, it'd simply be:
script.pl < script.sh > formatted.out
J. Gleixner Guest
-
Glenn Jackman #3
Re: Execute shell script from a perl script
J. Gleixner <glex_nospam@qwest.net> wrote:
You mean:> Or if your perl script takes input from STDIN, and you modified your
> shell script to echo to STDOUT, no need to call system, it'd simply be:
>
> script.pl < script.sh > formatted.out
script.sh | script.pl > formatted.out
--
Glenn Jackman
Glenn Jackman Guest
-
Andres Monroy-Hernandez #4
Re: Execute shell script from a perl script
"kderaedt" <kderaedt@hotmail.com> wrote in message news:<3efafb0e$0$1064$ba620e4c@reader1.news.skynet .be>...
Hi Karel,> Hi,
>
> How can I executed a Unix shell script from a Perl script.
> The shell script is a dump of a oracle table to a file. The perl script is
> for the reformat of this output file.
>
> Thanks
>
> Karel
you can try using a system, exec or backticks.
Here is the documentation for those:
[url]http://www.perldoc.com/perl5.6/pod/func/system.html[/url]
[url]http://www.perldoc.com/perl5.6/pod/perlop.html#[/url]
Hope that helps.
Regards,
-Andres Monroy-Hernandez
Andres Monroy-Hernandez Guest



Reply With Quote

