How to manipulate a string, variable in shell

Posted by user558134 on Stack Overflow See other posts from Stack Overflow or by user558134
Published on 2010-12-30T09:50:45Z Indexed on 2010/12/30 9:54 UTC
Read the original article Hit count: 149

Filed under:
|

Hei everyone!

I have this variable in shell containing paths separated by a space:

LINE="/path/to/manipulate1 /path/to/manipulate2"

I want to add additional path string in the beginning of the string and as well right after the space so that the variable will have the result something like this:

LINE="/additional/path1/to/path/to/manipulate1 additional/path2/to/path/to/manipulate2"

Any help appreciated Thanks in advance

© Stack Overflow or respective owner

Related posts about shell

Related posts about unix