J
J
Johnny Gat2020-12-03 18:52:21
linux
Johnny Gat, 2020-12-03 18:52:21

Is it possible to dynamically generate a configuration file if it requires a path to it?

The question is not specifically about installing Kaspersky Anti-Virus in Linux, it is given as an example.

Calling the following command will launch the initial setup of Kaspersky Endpoint Security in automatic mode and set the settings specified in the initial setup configuration file.

kesl-setup.pl --autoinstall=<полный путь к исходному конфигурационному файлу>

I want to dynamically generate the contents of such a configuration file in a bash script. And this is where my question comes in. Is it possible to somehow redirect dynamically generated content instead of specifying a path to a file? If not, then where is it more correct to save such a file in Linux (perhaps to the "tmp" directory, but won't the situation arise when the OS decides to clean up "tmp" right now)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Karasik, 2020-12-03
@JohnnyGat

Is it possible to somehow redirect dynamically generated content instead of specifying a path to a file?

Depends on the program. Real Unix programs can get data from stdin. For example
echo "hello world" | gzip >/tmp/hello.gz
If not, then you can save to /tmp, only old files are deleted.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question