[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Prepending text to the beginning of a file
From: |
Davide Brini |
Subject: |
Re: Prepending text to the beginning of a file |
Date: |
Fri, 17 Jun 2022 15:46:48 +0200 |
On Fri, 17 Jun 2022 18:35:25 +0500, Akbarkhon Variskhanov
<akbarkhon.variskhanov@gmail.com> wrote:
> In my understanding, it should let me, well, read from and write to the
> file for in-place editing.
>
> Let's say that I open a file for both reading and writing:
> exec 3<> file
> Next, I'd like to write to it:
> echo "some rather long text" >&3
This _overwrites_ whatever is at the beginning of the file, it does not
insert.
--
D.