mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 22:17:52 +08:00
4acea72700
Usage: read -n nchars Reads maximum of nchars characters. If nchars <= 0, there's no limit.
45 lines
366 B
Plaintext
45 lines
366 B
Plaintext
2
|
|
2
|
|
1
|
|
[one
|
|
two]
|
|
1
|
|
[one
|
|
two]
|
|
1
|
|
[one
|
|
two
|
|
]
|
|
|
|
1 'hello' 1 'there'
|
|
1 'hello there'
|
|
1 ''
|
|
1 '' 1 ''
|
|
1 'test' 1 '' 1 ''
|
|
|
|
1 'hello'
|
|
1 'h' 1 'ello'
|
|
1 'h' 1 'e' 1 'llo'
|
|
1 ''
|
|
1 't' 1 ''
|
|
1 't' 1 '' 1 ''
|
|
1 ' ' 1 't'
|
|
|
|
2 'hello' 'there'
|
|
1 'hello'
|
|
6 'this' 'is' 'a' 'bunch' 'of' 'words'
|
|
3 'one' 'two' 'three'
|
|
0
|
|
|
|
5 'h' 'e' 'l' 'l' 'o'
|
|
1 'h'
|
|
0
|
|
|
|
# read -n tests
|
|
tes
|
|
test
|
|
test
|
|
tes
|
|
tin
|
|
t
|