[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: extension of file-test primitives?
From: |
Greg Wooledge |
Subject: |
Re: extension of file-test primitives? |
Date: |
Wed, 23 Aug 2017 09:34:46 -0400 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Wed, Aug 23, 2017 at 04:22:09PM +0300, Pierre Gaston wrote:
> testfile () {
> local OPTIND=1 f=${!#}
> while getopts abcdefghLkprsSuwxOGN opt;
> do
> case $opt in
> [abcdefghLkprsSuwxOGN]) test -$opt $f || return 1;;
"$f"
> *)return 1;;
> esac;
> done
> }
>
> if testfile -fx file;then.
Add the quotes, make opt local too, and I think we have a winner.
- Re: extension of file-test primitives?, (continued)
Re: extension of file-test primitives?, Chet Ramey, 2017/08/21
Re: extension of file-test primitives?, Greg Wooledge, 2017/08/21
- Re: extension of file-test primitives?, Chet Ramey, 2017/08/21
- Re: extension of file-test primitives?, L A Walsh, 2017/08/23
- Re: extension of file-test primitives?, Greg Wooledge, 2017/08/23
- Re: extension of file-test primitives?, L A Walsh, 2017/08/23
- Re: extension of file-test primitives?, Pierre Gaston, 2017/08/23
- Re: extension of file-test primitives?,
Greg Wooledge <=
- Re: extension of file-test primitives?, Chet Ramey, 2017/08/23
- Re: extension of file-test primitives?, Dethrophes, 2017/08/23
- Re: extension of file-test primitives?, Chet Ramey, 2017/08/23
- Re: extension of file-test primitives?, Dethrophes, 2017/08/23
- Re: extension of file-test primitives?, Chet Ramey, 2017/08/23
- Re: extension of file-test primitives?, dethrophes, 2017/08/23
- Re: extension of file-test primitives?, Chet Ramey, 2017/08/23
- Re: extension of file-test primitives?, dethrophes, 2017/08/23
- Re: extension of file-test primitives?, Chet Ramey, 2017/08/23
- Re: extension of file-test primitives?, dethrophes, 2017/08/23