i am using grep command to create an array using data from a file. These is a sample from a file abc.xyz
[abc] Hello world
[abc] qwertyuy
[qwe] poiuyttrr
[abc] Zzxcvzxvxczv
I want to store each of the lines in an array which is having word'[abc]' in the begining I am using the following command
grep -n "\[abc\]" abc.xyz
And storing it in a variable, But the varaiable is got getting stored as an array. Please suggest how to do it.