On 03/27/15 at 10:13am, Baoquan He wrote:
On 03/26/15 at 05:20pm, Minfei Huang wrote:
On 03/26/15 at 05:10pm, Baoquan He wrote:
On 03/26/15 at 05:05pm, Minfei Huang wrote:
On 03/26/15 at 04:10pm, Baoquan He wrote:
+# fail to cut out the path, if the path contains duplicated "/"
This function is not good. I suggest using one line of sed command to do this. This kind of process looks weird.
I will investigate it, if there is a better way to deal it.
It should be like s#/+#/#, it's simpler than yours. Code will be bloated very much if all code is written like below.
Dave might have a precise thought on this, you can consult him.
Thank you, I will do.
You can try this.
➜ ~ aa="/////aa//bb/c" ➜ ~ echo $aa|sed "s#/{1,}#/#g" /aa/bb/c
Thanks Bao, It works. I will merge it in the next re-post version patch.
Thanks Minfei