The Artima Developer Community
Sponsored Link

Java Buzz Forum
Some (Possibly) Useful Tools

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Brian McCallister

Posts: 1282
Nickname: frums
Registered: Sep, 2003

Brian McCallister is JustaProgrammer who thinks too much.
Some (Possibly) Useful Tools Posted: Nov 29, 2005 7:55 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Brian McCallister.
Original Post: Some (Possibly) Useful Tools
Feed Title: Waste of Time
Feed URL: http://kasparov.skife.org/blog/index.rss
Feed Description: A simple waste of time and weblog experiment
Latest Java Buzz Posts
Latest Java Buzz Posts by Brian McCallister
Latest Posts From Waste of Time

Advertisement

I saw Bruce's post about (the incredibly useful) pbcopy/pbpaste today. They rock! That said, they are not quite what I need a lot of times, so here are a couple quick tools I whipped together for ye shell bangers.

get and put : These are basically a clipboard for the shell. Get takes input from standard in and stashes it. It is like yank or copy in a gui. Put does the opposite, it takes whatever get stashed and spews it to standard out (paste). No biggie, but useful: (I inserted the blank lines in the output, for readability)

brianm@kite:~/src/activemq$ cat build.properties | get

brianm@kite:~/src/activemq$ cd ../wombatattack

brianm@kite:~/src/wombatattack$ put > activemq.properties

brianm@kite:~/src/activemq$ cd ../wombatdefense

brianm@kite:~/src/wombatdefense$ put > activemq.properties

Now, the more fun tools are push and pop which are like put and get except they operate on a stack =)

brianm@kite:~/src/jdbi$ for x in $(find . -name Test*.java); do echo $x | push; done 

brianm@kite:~/src/jdbi$ pop
./src/test/org/skife/jdbi/TestSQLOperations.java

brianm@kite:~/src/jdbi$ pop
./src/test/org/skife/jdbi/TestScriptStuff.java

brianm@kite:~/src/jdbi$ pop
./src/test/org/skife/jdbi/TestRowMap.java

brianm@kite:~/src/jdbi$ pop --clear

The shocking part is that, as far as I know, these type of tools aren't part of the standard shell environment!

Read: Some (Possibly) Useful Tools

Topic: Creating your standard Oracle Warehouse Builder Time Dimension for your Datawarehouse Previous Topic   Next Topic Topic: PostgreSQL 8.1.0 Comes To Cygwin

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use