[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature Request - prepend to file
From: |
Bob Proulx |
Subject: |
Re: Feature Request - prepend to file |
Date: |
Sat, 5 Apr 2008 21:11:46 -0600 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Brock Noland wrote:
> > In addition to the above if I restrict myself to programs that already
> > know how to edit files in place I can think of a few additional easy
> > ways. Sed of course comes to mind. Here is one way to use sed to
> > edit a file in place and insert "foo" at the first line of the file.
>
> I forgot to mention that often I want to prepend an entire file.
I had that one already covered. :-)
> > Or to read a file "foofile" at the first line of the file.
> >
> > ed -s bar <<EOF
> > 0r foofile
> > w
> > q
> > EOF
Sorry we got off on the wrong foot.
Bob