Skip to content
This repository was archived by the owner on Jul 24, 2026. It is now read-only.
This repository was archived by the owner on Jul 24, 2026. It is now read-only.

write in the same file of input #46

Description

@m47730

Hi,
i like your work to create a more modern envsubst combined with statically compiling with musl, it's a very portable and efficient solution.

I have a minor request: is it possible to implement write the output in the same file as input? (without using some other tool like sponge)

ex:

cat test.txt
test: it $TEST

export TEST=work
renvsubst --variable=TEST --input=test.txt --output=test.txt
file test.txt
  test.txt: empty

if the output file is different, it works perfectly:

renvsubst --variable=TEST --input=test.txt --output=test2.txt
cat test2.txt
test: it work

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions