Hi,
I'm writing a bash script to post data over network, with netcat command.
I would like my script work with pipe, well, I'm using:
Code:
while read data; do
echo "$data" >> /tmp/paste_log
done
That rulz, but when the input data if finish, I would like ask to the user, a captcha system for bot prevention.
Code:
[... get data from server ...]
read -p "answer: " myanswer
[... output data with netcat ...]
The problem: "read" command is skipped when I use pipe, well "myanswer" is blank. 'Read' take the pipe as input data.
How can I read from stdin, after a pipe, without launch a second script ?
Thanks.
Sorry for my english. If you don't understand it, ask me
