File: example.ia-c-nocheck--learn

package info (click to toggle)
shellia 5.10
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 792 kB
  • sloc: sh: 7,840; makefile: 34
file content (34 lines) | stat: -rwxr-xr-x 624 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# vim: set filetype=sh :
#        file: example.ia-c-learn
#   copyright: Bernd Schumacher <bernd.schumacher@hpe.com> (2007-2020)
#     license: GNU General Public License, version 3
# description: example use -cl (check in learn modus)
#    see also: test.ia-c-learn
set -e
set -u

# prefer local copy
[ -f ia ] && . ./ia || . /usr/share/shellia/ia

sub()
{
  echo "one stdout"
  echo "one stderr" >&2
  echo "two stdout"
  echo "two stderr" >&2
  echo "three stdout"
  echo "three stderr" >&2
}

sub2()
{
  eval "$ia_init"
  ia_add sub
  ia -c --learn
}

eval "$ia_init"
ia_nocheck
ia_add "sub2"
ia -c --learn