Skip to content

Instantly share code, notes, and snippets.

@andis
Created September 5, 2011 09:05
Show Gist options
  • Save andis/1194501 to your computer and use it in GitHub Desktop.
Save andis/1194501 to your computer and use it in GitHub Desktop.
Sandwich STDIN and ARGV
#Setup:
git pull git://github.com/sometimesfood/sandwich.git
cd sandwich
rake gem:build
bundle install --path=vendor/bundle
#These work:
echo 'file "/tmp/blubb" do content "blubb";end'|bundle exec sandwich
echo 'file "/tmp/blubb" do content ARGV.join;end'|bundle exec sandwich /dev/stdin bla blubb
cat /tmp/blubb
#These fails with "sandwich: No such file or directory"
echo 'file "/tmp/blubb" do content ARGV.join;end'|bundle exec sandwich bla blubb
echo 'file "/tmp/blubb" do content ARGV.join;end'|bundle exec sandwich - bla blubb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment