I'm trying to break down a file with the following format:
[section_nme]
entries
dzdf
daff
[section 2]
enries
dfln
fnljfd
.
.
..
.
I'm reading this file, using "[" as my separator. It's working quite well, but I would like to be able to read the "[" character into my array as a valid character as well. So I'm wondering - is it possible to set a "just before" tag as my separator ($/)??
As far as I know it is not possible. $/ is just a simple string, you can't try and define a pattern like you might be able to do with other shells scripts. But you can add the '[' as needed to the output after getting it from the file.