blob: af41e3f279309165c84f61a3c578e303c96e19fd [file] [log] [blame]
Jari Aaltobb706242000-03-17 21:46:59 +00001# non-interactive
2
3# error
4read -n -1
5
6# from pipe -- should work, but doesn't change tty attributes
7echo abcdefg | {
8 read -n 3 xyz
9 echo $xyz
10}
11
12# fewer chars than specified
13echo ab | {
14 read -n 3 xyz
15 echo $xyz
16}
17
Chet Rameyac50fba2014-02-26 09:36:43 -050018echo abc | {
19 read -N 4 -d$'\n' foo
20 echo $foo
21}
22
Jari Aaltobb706242000-03-17 21:46:59 +000023read -n 1 < $0
24echo "$REPLY"