Skip to content

Instantly share code, notes, and snippets.

@kevinlebrun
Created August 7, 2013 12:10
Show Gist options
  • Save kevinlebrun/6173531 to your computer and use it in GitHub Desktop.
Save kevinlebrun/6173531 to your computer and use it in GitHub Desktop.
Bash corpoc
#!/bin/bash
{ coproc bc_proc { bc; read; } >&3; } 3>&1
echo "1 + 2" >&${bc_proc[1]}
echo "2 + 5" >&${bc_proc[1]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment