Answer the question
In order to leave comments, you need to log in
Is it possible to replace a file with the output of a program?
Good day!
Example:
There is a text file, file1 , with the content " Hello world ". I have a bash script with the following content:
#!/bin/bash
echo 123;
cat file1
we get its contents. cat | script.sh
, but the question is whether, without affecting the logic of some other program that reads some file, it can replace reading this file with output from my script, without writing new content to this file?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question