repo.or.cz
/
bush.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
improve of cmpl.
[bush.git]
/
testing
/
3.OriginalTest.dir
/
6.cmd
/
mapfile
/
mapfile1.sub
blob
b3d77f94da9a699c29b4ea2bea6aa169c26e0c15
1
: ${TMPDIR:=/tmp}
2
FILE=$TMPDIR/file
3
4
trap 'rm -f $FILE' 0 1 2 3 6 15
5
printf "%d\n" {1..20} > $FILE
6
7
mapfile -n 5 array < $FILE
8
echo ${array[@]}
9
10
mapfile -n 5 -c 1 -C "echo foo" array < $FILE
11
mapfile -n 5 -c 1 -C "echo foo" array < /dev/null