1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
#!/bin/sh
# vim: set filetype=sh :
# file: example.ia-c-s-m
# copyright: Bernd Schumacher <bernd.schumacher@hpe.com> (2007-2020)
# license: GNU General Public License, version 3
# description: example handling ia options -c -s -m
# see also: test.ia-c-s-m
#set -e # this line can not be used, because we really want to test errors
set -u
. ./ia
eval "$ia_init"
ia_add "a=1"
ia_add "a=\$((a+1))"
ia_add "nonexisting-command"
ia_stdout "^a="
ia_add "echo \"a=\$a\""
ia -c
|