From: Erik Nordgren (nordgren_at_sas.upenn.edu)
Date: Wed Jul 27 2011 - 14:39:02 CDT

Sara -- on my linux machine, this command appears to work the way you
want, if you just add the space:

   cat file.gro | sed "s/So/SA /g" > processed.gro

But perhaps the version of that command that will work better for you
will be as follows:

   cat file.gro | sed "s/So/SA\ /g" > processed.gro

That is, use a backslash-space in order to include a literal space
character within the argument to the sed program.

Also, make sure that you are using the right kind of quotation
marks... single quotes (') double quotes (") and back-quotes (`) all
mean different things to the Unix shell!

As for your desire to "sue" the stream editor, well, wouldn't we all
like to do that sometimes.... ;-)

-Erik

-- 
C. Erik Nordgren, Ph.D.
Department of Chemistry
University of Pennsylvania
On Tue, Jul 26, 2011 at 1:49 PM, Sara baretller
<sarabiocomputation_at_gmail.com> wrote:
> Thank you so much for your help
>
> I am trying to sue the  sed - stream editor for filtering and transforming
> text to replace an ion with another one and in the same time make a space
>
> cat file.gro | sed ``s/So/SA/g'' > processed.gro
>
> so i used the sed command and i was able to  change form So to SA but i
> could not make the space after  SA
>
> here the processed.gro
>
> like this     SA 4562       instead  of    SA   4562
>
> Please if you can help
>
> Thank you
>
> Sara
>
>
> On Tue, Jul 26, 2011 at 4:54 AM, Ajasja Ljubetič <ajasja.ljubetic_at_gmail.com>
> wrote:
>>
>>
>>>
>>> for more details on the find command try: man find
>>> or: info find
>>>
>>> this is, of course, not portable to windows.
>>>
>>
>> Well, that is not entirely true. One can install Git which on
>> windows conventionally installs the most useful unix command line tools.
>> Some additional tools can be found here and here.
>> One can also install msys (This is basically what git is based on, but the
>> installer is less is user friendly) or cygwin (too slow).
>> Of course, a native TCL implementation using glob is the best solution in
>> this case.
>> Best regards,
>> Ajasja
>