Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

NEW! perl script inside a shell script??

by Anonymous Monk
on Jun 27, 2002 at 18:41 UTC ( [id://177810]=note: print w/replies, xml ) Need Help??


in reply to Re: perl script inside a shell script
in thread perl script inside a shell script

I need to call a long perl script from a shell program..it needs to be like that, since the shell program is very big. any ideas? i'm new to this stuff,help!!
  • Comment on NEW! perl script inside a shell script??

Replies are listed 'Best First'.
Re: NEW! perl script inside a shell script??
by Anonymous Monk on Jun 25, 2013 at 18:08 UTC

    (sorry, I didn' know this would line-wrapt)
    (I realize I'm responding to an old post)
    #! /bin/sh

    # the shell script can be arbitrarily long

    echo $SHELL
    echo line filtered by pearl | perl -x $0

    exit
    # the previous line must not be removed

    (this is a void in the script as the shell nor perl will execute)

    # the following must not be removed
    #! perl
    # it can also be the full path of perl - the -x only looks for a #! and perl on the line though.

    # the following perl script must be come last but can be arbitrarily long

    while (<>) {
    s/pearl/perl/;
    }
Re: NEW! perl script inside a shell script??
by Anonymous Monk on Jun 25, 2013 at 18:05 UTC
    (I realize I'm responding to an old post) #! /bin/sh # the shell script can be arbitrarily long echo $SHELL echo line filtered by pearl | perl -x $0 exit # the previous line must not be removed (this is a void in the script as the shell nor perl will execute) # the following must not be removed #! perl # it can also be the full path of perl - the -x only looks for a #! and perl on the line though. # the following perl script must be come last but can be arbitrarily long while (<>) { s/pearl/perl/; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://177810]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-09-18 12:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The PerlMonks site front end has:





    Results (24 votes). Check out past polls.

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.