In these path lines, the first part of path name contains number '/data28/ and three path group with different first part of name. I need to insert one path name: "bck1" in the beginning of each path name. After manipulation, the path name in the file should be like this:
I tried to use "v" i editor and "sed" to insert first part of path name. it can work on some lines and could not globally make change. I want to learn how to use "sed" to globally update the file path and deal with different number in path name and with different path name. Please help to provide your advice and command here. I will test and come back to report progress. Thanks for your time and help.
I have tested. It works. your code can deal with all situation and insert new path text in the beginning of the all path. Thanks a lot. If you can give some explanation about "sed" options such as 's#/#/text/#' , that will help more. I searched on line and could not get more information about these expression. Of course, I will do more search and learning for "sed".
Thanks for explanation. I still do not understand. man sed , only tell us 's/REGEXP/REPLACEMENT/FLAGS'. . In your command, 's#/#/text/#' , text is REPLACEMENT. So 1st #, 2nd # and 3rd # stand for what? Wildcard for path name? Are they extended expressio or something else? I checked online and other books. I could not find answer. Can you please explain your command in details? Sorry for this. I want to really know the programming logic of your command.
Thanks in advance for your help.
Thanks a lot. Here # is delimiter. I thought the # is some extended expression and tried to find more information without success. Now, I learned from you. I will keep this explanation for the future usage. Thanks again.