source: trunk/essentials/app-shells/bash/tests/read5.sub

Last change on this file was 3228, checked in by bird, 18 years ago

bash 3.1

File size: 343 bytes
Line 
1IFS=: read x y z << EOF
2:::
3EOF
4recho $x
5recho "$x"
6recho $y
7recho "$y"
8recho $z
9recho "$z"
10
11if [ -z "$x" ]; then
12 echo FOO
13else
14 echo BAR
15fi
16
17IFS=: read -a A << EOF
18:::
19EOF
20
21recho ${A[0]}
22recho "${A[0]}"
23
24recho ${#A[@]}
25
26recho "${A[@]}"
27
28if [ -z "${A[0]}" ]; then
29 echo FOO
30else
31 echo BAR
32fi
33
34echo -n ${A[0]} | cat -vet
35echo -n ${A[0]} | wc
36
Note: See TracBrowser for help on using the repository browser.