LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   help with shell script - fill an array with values from a file (https://www.linuxquestions.org/questions/linux-general-1/help-with-shell-script-fill-an-array-with-values-from-a-file-464852/)

delmoras 07-17-2006 09:00 AM

help with shell script - fill an array with values from a file
 
hello guys,i am having problems filling an array with values from a file?can anyone help me?
the file format is like this:

john/
george/
mary/
nick/

thanks.....

unSpawn 07-17-2006 11:19 AM

Please note reading answers doesn't equal learning.

Code:

array=($(< file))


All times are GMT -5. The time now is 04:13 AM.