aboutsummaryrefslogtreecommitdiffstats
path: root/tests/read3.sub
blob: 22088cbf3c71711628fc87b653029de30d1fc0be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# non-interactive

# error
read -n -1

# from pipe -- should work, but doesn't change tty attributes
echo abcdefg | {
	read -n 3 xyz
	echo $xyz
}

# fewer chars than specified
echo ab | {
	read -n 3 xyz
	echo $xyz
}

read -n 1 < $0
echo "$REPLY"