thank you sir
theres a misunderstanding tho
with exec i meant i exec socat instead of without exec

i may be able to reproduce it soon as i need to extend my softwares

peace

On Sun, Mar 14, 2021 at 3:37 PM Dale R. Worley <wor...@alum.mit.edu> wrote:

> > 2021年3月13日(土) 8:06 Alex fxmbsw7 Ratchev <fxmb...@gmail.com>:
> >> but using it resulted sometimes output of code of the script in the
> output
> >> of the files
> >> removing exec made it work normally as supposed
>
> One possibility is a typo, using "<<" rather than "<".
>
> Koichi Murase <myoga.mur...@gmail.com> writes:
> > I don't know about `socat', but maybe it's just the file descriptor
> > collision. One needs to make sure that the file descriptor is not yet
> > used when a new file descriptor is opened. For example, in Bash
> > scripts, one should use the file descriptor 3--9 if you manually
> > specify it because the file descriptors larger than 9 may be already
> > used for other purposes.
>
> bash has the useful ability to select an unused file descriptor, such as
>
>     exec {new_descr}>wherever
>
> That opens the file "wherever" for writing on some previously closed
> file descriptor and assigns the number to the variable "new_descr".
> After that you can do
>
>    echo >&$new_descr
>
> etc.
>
> Dale
>

Reply via email to