cards
Decks
aslamK's deck
Sign in
Sign up
Menu
Query
Help
Bash function to read the lines of a file into an array using the builtin, mapfile.
aslamK
10 years
Bash function to read the lines of a file into an array using the builtin, mapfile.
Posted
2014-09-29
. Visible to the public.
Reads the lines of the specified file into an array. The resulting array is in the dedicated variable,
MAPFILE
.
Skips "commented" lines or portions of lines.
Skips blank lines.
Trims leading & trailing spaces in every line.
gist.github.com
aslamK
Say thanks
Last edit
2014-09-29
Tags
bash
,
mapfile
Privacy policy
Terms of service
Imprint
This website uses short-lived cookies to improve usability.
Accept
or
learn more