I’m running a binary inside the bash script like to communicate with it… (the binary uses stdin, stdout)
#!/bin/bash
touch kacsa.txt
echo `./bbox 2`>>kacsa.txt
echo 2
echo 2
read -r KACSA >> kacsa.txt
I want to run bbox with option 2 and then give a simple input (2,2) after that reading in what was the output, and putting it in a text file (kacsa.txt) please help
example: I can run bbbox like this
>>./bbox 2 //it runs now
2 // it was written by
2 //it was written by me
4 // bbx write in console
I want to do the same thing with bash... the outup should goes tho an text file "kacsa.txt"
Try this:
stdin of
./bboxis fed by the pipe.stdout of
./bboxis put in the file.