I am having a script in which I am declaring arrays like below:
declare -a Pool=("Terrace|HouseTerrace_")
declare -a Library=("lib1 lib2 lib3")
declare -a Name=("Guru/Raju Albert Deepak")
declare -a Email=("[email protected],[email protected] [email protected] [email protected]")
Sub=("Media Rotation")
i=0
while [ $i -lt ${#Pool[@]} ]
do
command blah balh blah
i=`expr $i + 1`
done
Now what i want is that instead of declaring values in aaray here i should import it from file (either text or csv ) or is there any better way perfroming this task. I don want to give access to script file to users.
mapfilebash builtin.