Bash-4.3 distribution sources and documentation
[platform/upstream/bash.git] / tests / source7.sub
1 shopt -s expand_aliases
2
3 : ${TMPDIR:=/var/tmp}
4
5 echo '((echo abc; echo def;); echo ghi)' > $TMPDIR/x28-$$
6 . $TMPDIR/x28-$$
7 rm -f $TMPDIR/x28-$$
8
9 echo after
10
11 TMPFILE=$TMPDIR/x29-$$
12
13 echo "#! ${THIS_SH}" >$TMPFILE
14 cat >> $TMPFILE << \EOF
15
16 (echo -n "$1 "; echo subshell)
17 EOF
18 chmod 755 $TMPFILE
19
20 alias foo1='$TMPFILE one.1; source $TMPFILE two.1; source $TMPFILE three.1; $TMPFILE four.1'
21 alias foo2='$TMPFILE one.2;
22 source $TMPFILE two.2;
23 source $TMPFILE three.2;
24 $TMPFILE four.2;
25 '
26
27 foo1
28 foo2
29
30 echo x29 - done
31 rm -f $TMPFILE
32
33 # this is also treated similarly to an alias expansion internally
34 ((echo abc; echo def;); echo ghi)
35
36 if (((4+4) + (4 + 7))); then
37         echo ok
38 fi
39
40 (())    # make sure the null expression works OK