Re: replace string

satish <[email protected]>
Newsgroups gmane.editors.sed.user
Message-ID <CAGofMXMK2xJZiP7QccpY-4D6dvD7DLgOqMMs5WrRtOmMi3xwSQ@mail.gmail.com>
Hi Maria,


Try this command


sed '/*command\:mkdir -type -type_tag*/s/string1/string2/g'  filename >
output_file


Regards,
Satish Kumar


*-Regards,*
* Satish*




On Mon, Sep 30, 2013 at 8:33 AM, Lis Maria <[email protected]> wrote:


>
>
> Hi,
>
> Any pointers?
>
> Thanks,
> Lis
>
>
> On Thu, Sep 26, 2013 at 10:55 AM, Lis Maria <[email protected]> wrote:
>
>> Hi,
>>
>> I have a file and in that a line as below
>>
>> command:mkdir -type -type_tag <this could be anything> -yes -noadmin
>>
>> I want to replace <this could be anything> with some other string.
>>
>> How can i do this? tried couple of sed command. but not able to get
>> through.
>>
>> Thanks,
>> Lis
>>
>
>
>
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.