[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: typeset -p on an empty integer variable is an error. (plus -v test w
From: |
Greg Wooledge |
Subject: |
Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements) |
Date: |
Mon, 14 Jan 2013 08:33:17 -0500 |
User-agent: |
Mutt/1.4.2.3i |
On Sun, Jan 13, 2013 at 03:31:24AM +0100, John Kearney wrote:
> set -o errexit
> test_func() {
> [ ! -d test ] && echo test2
> }
>
> echo test3
> test_func
> echo test4
>
> now so long as test doesn't exist in the cwd it should errexit.
> at least it did for me just now.
Cannot reproduce.
imadev:~$ cat bar
#!/bin/bash
set -e
f() { test ! -d nosuchdir && echo no dir; }
f
echo survived
imadev:~$ ./bar
no dir
survived
- typeset -p on an empty integer variable is an error. (plus -v test w/ array elements), Dan Douglas, 2013/01/11
- Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements), John Kearney, 2013/01/11
- Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements), Dan Douglas, 2013/01/11
- Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements), John Kearney, 2013/01/11
- Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements), Dan Douglas, 2013/01/12
- Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements), John Kearney, 2013/01/12
- Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements), Chet Ramey, 2013/01/12
- Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements), John Kearney, 2013/01/12
- Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements),
Greg Wooledge <=
- Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements), John Kearney, 2013/01/14
- Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements), Greg Wooledge, 2013/01/14
- Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements), John Kearney, 2013/01/14
- Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements), Chet Ramey, 2013/01/14
- Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements), John Kearney, 2013/01/15
- Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements), Ken Irving, 2013/01/14
- Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements), John Kearney, 2013/01/14
Re: typeset -p on an empty integer variable is an error. (plus -v test w/ array elements), Chet Ramey, 2013/01/11