[Wolves] Arrays within Bash
simonb at fatsportsman.eu
Thu Jul 28 10:52:29 UTC 2011
The list has been quiet this recently so I thought I'd put forward
I have a file that is formatted in a similar fashion to:
The problem is that I need to loop through all the items that start
with BP1_FS in another script. I have tried to pull them out into an
array so I can loop through them, but the problem I am having is that
the the records in the array are being split into "'bp1_usr"
"/usr/BP1" and so forth.
It seems to be splitting the records at any occurance of a space, but
I need that space left in, and for everything in the quote marks to be
a separate records.
Can anyone suggest either a better way of doing this, or how I can get
around my array problem. Please note that although I'd like to just
use python, it has to be a bash script.
More information about the Wolves