RE: Run Shell Script Using Perl

From: ext-Chetak Sasalu (ext-Chetak.Sasalu_at_nokia.com)
Date: 12/10/04


Date: Fri, 10 Dec 2004 16:16:23 +0100
To: <beginners@perl.org>


-----Original Message-----
From: ext Chris Devers [mailto:cdevers@pobox.com]
Sent: Friday, 10. December 2004 15:58
To: roime puniran
Cc: Perl Beginners List
Subject: Re: Run Shell Script Using Perl

On Fri, 10 Dec 2004, roime puniran wrote:

> I have a linux shell script used to transfer files
> into the other machine and i need PERL running my
> script..
> How can i do that?..did some one know?
 
You need to rewrite a shell script that does file transfer in Perl?

Ok, Perl can do that.

How are you trying to transfer the files? There are a lot of ways that
would work -- ftp, scp, rsync, cp over NFS mount (or SMB mount, or DAV
mount, or...), etc. We need to know what options to go with.

If the shell script isn't very long, can you paste it in a message to
the list? If it is long, can you paste a section with the parts you need
to rewrite in Perl?

Out of curiosity, if the shell script works, why rewrite it? I like Perl
and all, but not to the point that every perfectly good script in some
other language needs to be rewritten in Perl...

I think he wants to call the shell script from a different perl script.
qx( shell script which does ftp)

right ?

Chetak

-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Relevant Pages

  • Re: Capture stderr stdout using system call with commas?
    ... > I'm trying to run some mount and rsync commands from inside a perl ... > another option of mount and bombs out. ... I have several perl scripts that run as cron jobs and I want to capture ... The shell script which executes the perl program clean-archive is as ...
    (comp.lang.perl.misc)
  • Re: file rename help
    ... Why, BTW? ... a shell script is a shell script and a Perl program is... ... what if $cfile was empty and hence moved to "$cfile.zero.txt"?!? ...
    (comp.lang.perl.misc)
  • Re: Scripting question, [small programming question
    ... at "rpm -ql util-linux". ... > comprehensive language like perl. ... I think a good rule of thumb is that if your shell script doesn't fit on a ...
    (Fedora)
  • Setting LD_LIBRARY_PATH env variable for child process
    ... I'm trying to rewrite a Bourne shell script in Perl. ... CLASSPATH variables, exports them and kicks off a Java process. ...
    (comp.lang.perl.misc)
  • [OT] Re: simple question on C++
    ... Jerry Stuart wrote: ... >> have something like this working today, I'd probably use Perl. ... I am familiar with Linux and would ... Well, on a typical Solaris system a shell script would do, and no reboot ...
    (alt.comp.lang.learn.c-cpp)