Created
January 5, 2009 11:47
-
-
Save matthewtodd/43363 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
# I have a couple of GeekTool windows at the bottom of the screen, | |
# where it's nice to bottom-justify their contents, but GeekTool | |
# doesn't seem to support this natively. | |
# | |
# Usage: | |
# cat TODO.rdoc | bottom-justify.rb 24 | |
# | |
# It seems like there could be a nice shell command for this, | |
# something like `tail -n 24`, except tail doesn't insert the blank | |
# lines. Am I missing something? | |
height = ARGV.shift.to_i | |
lines = ARGF.readlines | |
(height - lines.length).times { puts } | |
puts lines |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment