#!/bin/bash

if [ -p commands ]; then
  rm commands
fi

mkfifo commands

while true; do sh -c '$(cat commands)'; done

#put this file in your bashrc

function cat_fifo(){
  fifo="$1"
  if [ -p $fifo ]; then
      rm $fifo
    fi

    mkfifo $fifo

    while true; do sh -c "$(cat $fifo)"; done
}

Create function to make and cat the fifo
Create function to make and cat the fifo