Re: How to run a Shell script from within Perl
- From: "nobull67@xxxxxxxxx" <nobull67@xxxxxxxxx>
- Date: 23 Nov 2006 01:08:05 -0800
On Nov 23, 12:40 am, eldonlehm...@xxxxxxxxxxx wrote:
Hi there. I am new to this group and to Perl - but I would appreciate
some help.
I have a medical (diabetes) Website that is run for free - which I have
had on the Web for several years now. Over the years I have set up
some shell scripts to automate various backup and maintenance processes
at the Website. Everything was running fine until my ISP was ?taken
over and as a result went through a transition moving all their
customers' Websites to new servers. None of the nitty gritty of the
technical aspects of this transition were explained. However post
transition none of my Shell scripts - which previously worked fine -
would operate any longer.
I have just discovered from the ISP, months later, that the reason is
they no longer support Shell scripts on their servers. They recommend
that I run my Shell scripts from within Perl.
This may be fine - but I have absolutely no idea how to convert my
simple Shell scripts to run from within Perl.
No convertion would be necessary.
Is there a simple way to achieve this - or do I have to learn Perl and
re-write all the commands in Perl?
This very much depends on what you are trying to do. There is no simple
shell->Perl converter so if you want to convert you'll need to learn a
bit of Perl.
On the other hand if, as you first said, you only want to run your
shell scripts from within Perl then all you need to know is the one
Perl command exec().
I would be grateful for any help / guidance / suggestions that people
maybe able to offer.
You need to be clear about what it is you are trying to do.
If the ISP has prevented the httpd (or something) from calling shell
interpreter directly but has not actually prevented you using the shell
interpreter then this is one thing.
If the ISP has prevented you from calling the shell interpreter at all
this is quite another.
It seems likely that if they've got rid of the shell then they've
actually made some major platform changes so simply transliterating
things like backup and maintenance scripts would be unlikely to work as
chances are the commands you need for backup and maintenance will have
changed too.
.
- References:
- How to run a Shell script from within Perl
- From: eldonlehmann
- How to run a Shell script from within Perl
- Prev by Date: Re: Free PERL Editor
- Next by Date: Re: install Class::DBI::FromForm error
- Previous by thread: How to run a Shell script from within Perl
- Next by thread: install Class::DBI::FromForm error
- Index(es):
Relevant Pages
|
|