the following script.bin add line by line tee to the .log file (from my bash script)
IP=xxx.xxx.xxx.xxx
./script.bin | tee -a file.log
my goal is to add “IP = 127.0.0.1” after every line created by the tee (example IP address)
note: we cannot modify script.bin to add "IP = 127.0.0.1" - because its binary
I need advice on how we can add IP = xxx.xxx.xxx.xxx after every line created in the .log file
John
cat file.log (the ordinary file.log)
start_listen_to_port - 5500
start_listen_to_port - 5400
start_listen_to_port - 5410
.
.
.
cat file.log ( the right log.file syntax )
start_listen_to_port - 5500 IP=127.0.0.1
start_listen_to_port - 5400 IP=127.0.0.1
start_listen_to_port - 5410 IP=127.0.0.1
.
.
.
source
share