-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path15-bashisms.sh
More file actions
37 lines (29 loc) · 679 Bytes
/
Copy path15-bashisms.sh
File metadata and controls
37 lines (29 loc) · 679 Bytes
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
35
36
37
# try running this file with both bash & sh
echo '
##################
## Example 15.1: #
## [[ #
##################
'
if [[ -e /tmp ]]; then
echo '/tmp exists'
fi
echo '
#########################
## Example 15.2: #
## diff <(cmd1) <(cmd2) #
#########################
'
echo 'this one actually causes a syntax error that stops the
rest of the script from running in sh, uncomment it if you
want to see'
# diff <(ls files/*.txt) <(ls files/)
echo "
####################
## Example 15.3: #
## brace expansion #
####################
"
echo a.{png,svg}
echo {1..5}
# there are a LOT more bashisms than just these 3