Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

bash load file as array

# 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/
Comment

bash read file into array

readarray -t arr <file
Comment

PREVIOUS NEXT
Code Example
Shell :: find command absolute path 
Shell :: git see remote changes before pull 
Shell :: bash script wget 
Shell :: How to undo the most recent local commits in Git 
Shell :: git push main 
Shell :: linux crée utilisateur sudo 
Shell :: cat stands for in linux 
Shell :: using scp with ssh with server credentials 
Shell :: github portfolio 
Shell :: bundle uninstall old gems 
Shell :: delete whole line in vi 
Shell :: Apache2 Ubuntu Default Page 
Shell :: cordova-plugin-facebook4 update 
Shell :: list files recursively 
Shell :: fix pvc pending kubernetes 
Shell :: unix timestamp bash 
Shell :: dos2unix 
Shell :: install pup command 
Shell :: Use R markdown in github README 
Shell :: installing android studio on kali linux 
Shell :: turtlebot installation 
Shell :: install serverless-google-cloudfunctions 
Shell :: vue telephone number 
Shell :: parrot os postman download 
Shell :: git add and commit in one command 
Shell :: kali linux nit signing in 
Shell :: git reset commit before file 
Shell :: redux 
Shell :: ssh sever time out 
Shell :: find index of string in bash 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =