Hey, >> If a rename atom A into B, it will mix the old atom B which already there >> before A renamed into B. However, if the old atom B also need to be renamed >> into C. Here is the problem , command cannot recognize this atom B is the >> new generated or the old atom B. Of course, those atom B derive from A >> should not be renamed into C..... > > Do two passes of sed per the earlier suggestion. Do B->C, then A->B.
sed -e 's/B/C/' -e 's/A/B/' file.in > file.out Cheers, Tsjerk -- Tsjerk A. Wassenaar, Ph.D. post-doctoral researcher Molecular Dynamics Group * Groningen Institute for Biomolecular Research and Biotechnology * Zernike Institute for Advanced Materials University of Groningen The Netherlands -- gmx-users mailing list gmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/Support/Mailing_Lists