mapfile is a bash builtin command

commandline session

$ 4.2.36 1 501---> mapfile
^C
$ 4.2.36 2 502---> man mapfile
No manual entry for mapfile
$ 4.2.36 3 503---> mapfile --help
bash: mapfile: --: invalid option
mapfile: usage: mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]
$ 4.2.36 4 504---> mapfile
god
is
love
$ 4.2.36 5 505---> echo $MAPFILE
god
$ 4.2.36 6 506---> echo $MAPFILE[0]
god [0]
$ 4.2.36 7 507---> echo $MAPFILE
god
$ 4.2.36 8 508---> echo $MAPFILE1

$ 4.2.36 9 509---> echo $MAPFILE
god
$ 4.2.36 10 510---> echo $MAPFILE
god
$ 4.2.36 11 511---> echo ${MAPFILE[1]}
is
$ 4.2.36 12 512---> echo ${MAPFILE[2]}
love
$ 4.2.36 13 513---> echo ${MAPFILE[0]}
god
$ 4.2.36 14 514--->

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s