Skip to content

Instantly share code, notes, and snippets.

@fairchild
Forked from anonymous/snippet.sh
Created July 16, 2009 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fairchild/148118 to your computer and use it in GitHub Desktop.
Save fairchild/148118 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.readline
stdin.puts "blue"
puts stdout.readline
sleep 1
end
puts 'bottom'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment