I'm not good at bash shell scripting in Ubuntu, so I need your help.
The problem is...
We use Perforce for SCM.
I try to get directories from //Development/
branches.
Until this time, everything was good.
But now I can't split branches by whitespace anymore, because of branches such as the following (note the embedded space):
//Development/graphic/release/Unity Provider
We need each branch on a separate line starting with //Development
, but always I get the following result (note the unwanted line break):
//Development/graphic/release/Unity Provider
How can I fix this?
Please help me. Thank you.
Below is a sample one-line string:
//Development/graphic/release/CM //Development/graphic/release/GManager //Development/graphic/release/Notification //Development/graphic/release/Core //Development/graphic/release/Provider //Development/graphic/release/WH //Development/graphic/release/Accessory //Development/graphic/release/Unity Provider //Development/graphic/release/tipManager
And, I want to get a result string like below (each branch name on its own line):
//Development/graphic/release/CM
//Development/graphic/release/GManager
//Development/graphic/release/Notification
//Development/graphic/release/Core
//Development/graphic/release/Provider
//Development/graphic/release/WH
//Development/graphic/release/Accessory
//Development/graphic/release/Unity Provider
//Development/graphic/release/tipManager
I also want to store the results in a list variable.
E.g., list[0]
should contain //Development/graphic/release/CM
.