Send string to another process stdin [duplicate]
This question already has an answer here:
How to redirect STDIN of background process?
2 answers
Shell Script: Sending input to background process
2 answers
Example process waiting an input sent to background
$ read -p "Input text and hit ENTER to exit" &
I try to write to stdin (fd/0) with n
$ echo -e "okn" > /proc/$!/fd/0
but
$ fg
read -p "Please hit ENTER"
so the process is still running, then string "okn" never reach it
How can I send a string+ENTER to another process STDIN?
linux bash process proc stdin
marked as duplicate by Kusalananda
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Dec 20 '18 at 20:13
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How to redirect STDIN of background process?
2 answers
Shell Script: Sending input to background process
2 answers
Example process waiting an input sent to background
$ read -p "Input text and hit ENTER to exit" &
I try to write to stdin (fd/0) with n
$ echo -e "okn" > /proc/$!/fd/0
but
$ fg
read -p "Please hit ENTER"
so the process is still running, then string "okn" never reach it
How can I send a string+ENTER to another process STDIN?
linux bash process proc stdin
marked as duplicate by Kusalananda
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Dec 20 '18 at 20:13
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
What to you want to achieve with that? Maybe another way would also be OK (like setting a default value before, and use timeout parameter-t
forread
)?
– Jaleks
Dec 20 '18 at 20:18
to achieve = send ENTER from stdout one to another process stdin
– Hernán Eche
Dec 20 '18 at 20:27
add a comment |
This question already has an answer here:
How to redirect STDIN of background process?
2 answers
Shell Script: Sending input to background process
2 answers
Example process waiting an input sent to background
$ read -p "Input text and hit ENTER to exit" &
I try to write to stdin (fd/0) with n
$ echo -e "okn" > /proc/$!/fd/0
but
$ fg
read -p "Please hit ENTER"
so the process is still running, then string "okn" never reach it
How can I send a string+ENTER to another process STDIN?
linux bash process proc stdin
This question already has an answer here:
How to redirect STDIN of background process?
2 answers
Shell Script: Sending input to background process
2 answers
Example process waiting an input sent to background
$ read -p "Input text and hit ENTER to exit" &
I try to write to stdin (fd/0) with n
$ echo -e "okn" > /proc/$!/fd/0
but
$ fg
read -p "Please hit ENTER"
so the process is still running, then string "okn" never reach it
How can I send a string+ENTER to another process STDIN?
This question already has an answer here:
How to redirect STDIN of background process?
2 answers
Shell Script: Sending input to background process
2 answers
linux bash process proc stdin
linux bash process proc stdin
asked Dec 20 '18 at 20:07
Hernán Eche
666
666
marked as duplicate by Kusalananda
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Dec 20 '18 at 20:13
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by Kusalananda
StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;
$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');
$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Dec 20 '18 at 20:13
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
What to you want to achieve with that? Maybe another way would also be OK (like setting a default value before, and use timeout parameter-t
forread
)?
– Jaleks
Dec 20 '18 at 20:18
to achieve = send ENTER from stdout one to another process stdin
– Hernán Eche
Dec 20 '18 at 20:27
add a comment |
What to you want to achieve with that? Maybe another way would also be OK (like setting a default value before, and use timeout parameter-t
forread
)?
– Jaleks
Dec 20 '18 at 20:18
to achieve = send ENTER from stdout one to another process stdin
– Hernán Eche
Dec 20 '18 at 20:27
What to you want to achieve with that? Maybe another way would also be OK (like setting a default value before, and use timeout parameter
-t
for read
)?– Jaleks
Dec 20 '18 at 20:18
What to you want to achieve with that? Maybe another way would also be OK (like setting a default value before, and use timeout parameter
-t
for read
)?– Jaleks
Dec 20 '18 at 20:18
to achieve = send ENTER from stdout one to another process stdin
– Hernán Eche
Dec 20 '18 at 20:27
to achieve = send ENTER from stdout one to another process stdin
– Hernán Eche
Dec 20 '18 at 20:27
add a comment |
0
active
oldest
votes
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
What to you want to achieve with that? Maybe another way would also be OK (like setting a default value before, and use timeout parameter
-t
forread
)?– Jaleks
Dec 20 '18 at 20:18
to achieve = send ENTER from stdout one to another process stdin
– Hernán Eche
Dec 20 '18 at 20:27