Skip to content

Instantly share code, notes, and snippets.

@auser
Forked from fairchild/bash_input.sh
Created July 16, 2009 02:38
Show Gist options
  • Save auser/148120 to your computer and use it in GitHub Desktop.
Save auser/148120 to your computer and use it in GitHub Desktop.
#!/bin/bash
echo -n "Pick a color (blue, yellow, red ): "
read -e COLOR
echo It is a $COLOR day
require 'open3'
puts 'top'
Open3.popen3('./bash_input.sh') do | stdin, stdout, stderr |
puts stdout.sysread(256)
stdin.puts(gets())
end
puts 'bottom'
# top
# Pick a color (blue, yellow, red ): It is a hi day
# bottom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment