Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash load file into list

# Basic syntax:
while IFS= read line; do
	FILE_IN_ARRAY+=("$line")
done </path/to/your/file.txt
# Where:
#	- this site explains arrays helpfully: 
#		https://linuxize.com/post/bash-arrays/
Source by unix.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #bash #load #file #list
ADD COMMENT
Topic
Name
5+8 =