]> git.ipfire.org Git - thirdparty/bash.git/blob - tests/comsub6.sub
Bash-5.2-rc4 release
[thirdparty/bash.git] / tests / comsub6.sub
1 # This program is free software: you can redistribute it and/or modify
2 # it under the terms of the GNU General Public License as published by
3 # the Free Software Foundation, either version 3 of the License, or
4 # (at your option) any later version.
5 #
6 # This program is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 # GNU General Public License for more details.
10 #
11 # You should have received a copy of the GNU General Public License
12 # along with this program. If not, see <http://www.gnu.org/licenses/>.
13 #
14 DATE='Mon Aug 29 20:03:02 EDT 2022'
15 shopt -s expand_aliases
16
17 alias foo='echo $(echo $DATE)'
18 alias foo1='echo $(echo $DATE) '
19
20 foo
21 echo post foo
22
23 foo1
24 echo post foo1
25
26 alias comsub0='echo $(echo $DATE'
27 comsub0)
28 comsub0 ) after
29
30 alias math0='echo $(( 4+3 )'
31 math0)
32
33 alias x='VAR=$(echo hey)'
34 x
35 foo
36
37 echo $VAR after x
38
39 alias math1='echo $( date )'
40 math1)