0 Comments

Read files using arrays in Bash script

Read files using arrays in Bash script I have following file with some numeric contents in it bash-4.2$ cat /tmp/araytest.txt 1 2 3 4 5 6 7 8 9 10 11 12 13 14 If we would like save the file contents in Array. We can using following method. while read LINE do ARRAY+=(“$LINE”) done […]