Running a script using the HERE_DOC method in the background

I have a script that should execute in the background. I have to answer the question as soon as I run bash. How can i do this?

(nohup python script.py lst '<<HERE yes HERE' &) 
+6
source share
1 answer

Heptoc << is multi-line, for example

 somescript <<EOF & input EOF 

heredoc delimiter must be one on the last line

You can use one line of heredoc with <<< , for example:

 somescript <<<"this coming from stdin" & 
+10
source

Source: https://habr.com/ru/post/973890/


All Articles