jambi has asked for the wisdom of the Perl Monks concerning the following question:

Team, I have a .sh in which I do not want a certain .pl script from running. Ho do I comment /bypass just that piece. Thank you for the help in advance. So I forget to mention that the original setup script is a fairly large .sh and this gets uncompressed. Is there a way to include the comment from the command line itself eg: #starter.pl /blah1/blah2/blahx.sh Where when blahx.sh executes it fails at a check.pl script. I want it not run that check.pl script Thanks for your help

  • Comment on stop a .pl script from launching within a larger script

Replies are listed 'Best First'.
Re: stop a .pl script from launching within a larger script
by choroba (Cardinal) on Aug 06, 2015 at 13:31 UTC
    The comment character in sh is #:
    #!/bin/sh run_me.pl # dont_run_me.pl
    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re: stop a .pl script from launching within a larger script
by CountZero (Bishop) on Aug 06, 2015 at 15:05 UTC
    In case you cannot edit the shell script but you have access to the perl script:
    1. rename the perl script
    2. add a new, but empty, perl script with the "old" name.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

      So I forget to mention that the original setup script is a fairly large .sh and this gets uncompressed. Is there a way to include the comment from the command line itself eg: #starter.pl /blah1/blah2/blahx.sh Where when blahx.sh executes it fails at a check.pl script. I want it not run that check.pl script Thanks for your help

        Still sounds like →this is the solution. Otherwise, you should tell us why you can't apply it.