[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Prepending text to the beginning of a file
From: |
Lawrence Velázquez |
Subject: |
Re: Prepending text to the beginning of a file |
Date: |
Thu, 16 Jun 2022 18:49:38 -0400 |
User-agent: |
Cyrus-JMAP/3.7.0-alpha0-712-gb9e94258b0-fm-20220610.001-gb9e94258 |
On Thu, Jun 16, 2022, at 5:12 PM, Robert E. Griffith wrote:
> I think that the best you can do is either use a temporary file or, if
> you know the file is small enough, read it entirely into memory and then
> write the new data and then the old back out to the same file.
Since the OP is fixated on using the shell's built-in functionality,
it's worth remembering that variables cannot store arbitrary data.
--
vq