Advertisement
ijontichy

tofifo

Jun 8th, 2012
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.24 KB | None | 0 0
  1. tofifo()
  2. {
  3.     local fifo=$(mktemp -u fifo.XXXXXXXXXXXXXXXX)
  4.     mkfifo $fifo
  5.  
  6.     if [[ "$TERM" == "screen" ]]
  7.     then
  8.         screen tail -f $fifo
  9.     else
  10.         screen -d -m -- tail -f $fifo
  11.     fi
  12.  
  13.     eval $@ ">" $fifo
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement