[Ilugc] Help on Vi Editor
Suresh Ramasubramanian
linux at frodo.hserus.net
Tue Mar 15 09:36:22 IST 2005
Sridhar Ratna <sridharinfinity at gmail.com> wrote:
> On 14 Mar 2005 18:37:50 -0000, RAJ <rajkumar_chunkymails at rediffmail.com>
> wrote:
> > Dear sir,
> > I'm having a file with list of users (one user per line) , i want
> > to append an domain name (eg: @somedomain.com) to each line , can
> > anyone help me out to do this.
>
> I don't know about VI, but it can be simply done with shell
> for x in `cat usersfile`; do echo "$x at domain.com"; done
> redirect that to a new file
Just plain sed operation
Something like
%s/$/@domain.com/g
More information about the ilugc
mailing list