Imported from ../bash-4.0.tar.gz.
This commit is contained in:
parent
3185942a52
commit
17345e5ad2
134 changed files with 74214 additions and 4584 deletions
11
tests/mapfile1.sub
Normal file
11
tests/mapfile1.sub
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
: ${TMPDIR:=/tmp}
|
||||
FILE=$TMPDIR/file
|
||||
|
||||
trap 'rm -f $FILE' 0 1 2 3 6 15
|
||||
printf "%d\n" {1..20} > $FILE
|
||||
|
||||
mapfile -n 5 array < $FILE
|
||||
echo ${array[@]}
|
||||
|
||||
mapfile -n 5 -c 1 -C "echo foo" array < $FILE
|
||||
mapfile -n 5 -c 1 -C "echo foo" array < /dev/null
|
||||
Loading…
Add table
Add a link
Reference in a new issue