Getting Status Code Back to 'system'

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • PagCal

    Getting Status Code Back to 'system'

    How do I get a status code returned from a shell script?

    The following doesn't seem to work:

    #!/bin/php
    <?php
    exit 5;
    ?>
  • Joachim Weiß

    #2
    Re: Getting Status Code Back to 'system'

    PagCal schrieb:[color=blue]
    > How do I get a status code returned from a shell script?
    >
    > The following doesn't seem to work:
    >
    > #!/bin/php
    > <?php
    > exit 5;
    > ?>[/color]

    Hi,

    use die(5);


    HIH
    Jo

    Comment

    • Andy Hassall

      #3
      Re: Getting Status Code Back to 'system'

      On Sun, 14 Aug 2005 04:56:27 -0400, PagCal <pagcal@runbox. com> wrote:
      [color=blue]
      >How do I get a status code returned from a shell script?
      >
      >The following doesn't seem to work:
      >
      >#!/bin/php
      ><?php
      > exit 5;
      >?>[/color]

      In what way does it not seem to work?

      It's a parse error for starters. Correct that and it works, i.e. exit(5).

      --
      Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
      <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

      Comment

      Working...