Artificial intelligent assistant

Cat into fifo not running through bash I want to script these few lines mkfifo my.fifo cat >my.fifo & cat my.fifo | nc remotehost.tld 10000 But the line cat >my.fifo & When i run it manually it works, but not through bash shell. what could be the reason for it?

1) Create the first file


#!/bin/bash

mkfifo my.fifo
trap 'rm -f my.fifo' EXIT

cat cat >my.fifo;
nc localhost 2345


2) From another terminal


cat >my.fifo

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy be0dff782dd3fb1b7ab308e122c43f1f