Answer the question
In order to leave comments, you need to log in
tee, but not to a file, but to udp port
I'm a linux nerd, so apologies for the rambling question.
In the shell, run the command
my_process 2>&1 | tee -a log.txt
Ie . The stdout and stderr of the process are saved to a file and visible on the console.
It is necessary to do the same as simply as possible, but instead of log.txt send stdout and stderr to a UDP address like 177.22.37.11:6800
Thanks in advance to all who answered in essence.
Answer the question
In order to leave comments, you need to log in
I would be a little more careful - not every distribution has /dev/tcp and /dev/udp available in the bash.
You can use netcat (called as nc, there is a default almost everywhere)
Accordingly,
#!/bin/sh
mkfifo dummy
cat dummy | nc -u 177.22.37.11 6800
my_process 2>&1 | tee -a dummy
rm dummy
#!/usr/bin/env bash
mkfifo dummy
cat dummy > /dev/udp/177.22.37.11/6800 &
my_process 2>&1 | tee -a dummy
rm dummy
1. Yes, a month and a half is enough.
Plus, when transferring, the registration period is extended for a year.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question