On Wed, Feb 09, 2005 at 12:58:52AM -0600, Thomas Cameron wrote: > Using sed (clunky): > > [thomas.cameron@mail ~]$ cat foo > #!/usr/bonsaitools/bin/perl > [thomas.cameron@mail ~]$ sed "s/\/bonsaitools//" foo > #!/usr/bin/perl > [thomas.cameron@mail ~]$ sed "s/\/bonsaitools//" foo > zzz > [thomas.cameron@mail ~]$ mv zzz foo > [thomas.cameron@mail ~]$ cat foo > #!/usr/bin/perl > > Using perl (better): > > [thomas.cameron@mail ~]$ cat foo > #!/usr/bonsaitools/bin/perl > [thomas.cameron@mail ~]$ perl -pi -e 's/\/bonsaitools//' foo > [thomas.cameron@mail ~]$ cat foo > #!/usr/bin/perl Or using sed (better): sed -ie s,/bonsaitools,, foo Jakub