linux - How redirect nohup stdout to stdin -


is there way redirect nohup output stdin instead of nohup.out ?

i've tried:

nohup echo hello > /dev/stdin 2>&1 &

but not trick.

the nohup command purposefully detaches stdin, there nothing expects read in itself, , think after in question, redirecting output of nohup stdin next command. (well has read stdin, , ain't nohup.)

further, posix mandates output goes nohup.out file in working directory, if file can opened. can wire stdin of following commands nohup.out file. instance:

$ nohup echo hello 2>/dev/null; read var 0<nohup.out; echo "var=$var" var=hello 

Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -