[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: export in posix mode
From: |
Chet Ramey |
Subject: |
Re: export in posix mode |
Date: |
Wed, 27 Feb 2013 17:22:41 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130216 Thunderbird/17.0.3 |
On 2/27/13 5:17 PM, Bob Proulx wrote:
> Chet Ramey wrote:
>> Keep in mind that posh is overly strict in some areas (e.g., it throws
>> an error on `exit 1'). It may not be useful in isolation.
>
> As I did mention I have found that posh is somewhat less than useful
> in Real Life. But you say it throws an error on exit 1?
>
> $ cat >/tmp/trial <<'EOF'
> #!/bin/posh
> echo "Hello from posh"
> exit 1
> EOF
> $ chmod a+x /tmp/trial
> $ /tmp/trial
> Hello from posh
> $ echo $?
> 1
>
> I see no error when using 'exit 1'. Other than the expected exit
> code. What am I missing?
I don't know what version you're using; I have 0.11.
$ ./posh
\[\]${HOST}($SHLVL)\$ exit 1
./posh: exit: bad number
$ ./posh
\[\]${HOST}($SHLVL)\$ exit 10
./posh: exit: bad number
$ echo $?
1
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- export in posix mode, James Mason, 2013/02/27
- Re: export in posix mode, Eric Blake, 2013/02/27
- Re: export in posix mode, Chet Ramey, 2013/02/27
- Re: export in posix mode, Bob Proulx, 2013/02/27
- Re: export in posix mode,
Chet Ramey <=
- Re: export in posix mode, Eric Blake, 2013/02/27
- Re: export in posix mode, Bob Proulx, 2013/02/27