[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests |
Date: |
Wed, 19 Mar 2014 08:32:36 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 |
On 03/19/2014 08:28 AM, Eric Blake wrote:
> $ dash -c 'set 1 2 3; echo ${@: -1}'
> dash: 1: Bad substitution
>
> If you want the last argument, you'll have to do something hideous like:
>
> eval \${$#}
>
> Short of using eval, there is no portable way to get at the last
> positional argument in dash.
If you are sure you don't need the other positional arguments, you could
avoid eval with:
shift $(($# - 1)); echo $1
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 0/4] Add common QEMU control functionality to qemu-iotests, Jeff Cody, 2014/03/17
- [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests, Jeff Cody, 2014/03/17
- Re: [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests, Benoît Canet, 2014/03/19
- Re: [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests, Jeff Cody, 2014/03/19
- Re: [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests, Eric Blake, 2014/03/19
- Re: [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests,
Eric Blake <=
- Re: [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests, Jeff Cody, 2014/03/19
- Re: [Qemu-devel] [PATCH 1/4] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests, Eric Blake, 2014/03/19
[Qemu-devel] [PATCH 2/4] block: qemu-iotests - update 085 to use common.qemu, Jeff Cody, 2014/03/17
[Qemu-devel] [PATCH 3/4] block: qemu-iotests - fix image cleanup when using spaced pathnames, Jeff Cody, 2014/03/17
[Qemu-devel] [PATCH 4/4] block: qemu-iotests: make test 019 and 086 work with spaced pathnames, Jeff Cody, 2014/03/17