Skip to content

Instantly share code, notes, and snippets.

@outoftime
Created January 13, 2009 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save outoftime/46657 to your computer and use it in GitHub Desktop.
Save outoftime/46657 to your computer and use it in GitHub Desktop.
Pipe stdin into libnotify, line by line
#!/usr/bin/env ruby
while line = STDIN.gets
puts line if ARGV.include?('-v')
system('notify-send', line)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment