grep Location | awk ‘{print $2}’
can be shortened to
awk ‘/Location/ { print $2 }’
Note: This post is over 6 months old. You may want to check later in this blog to see if there is new information.
The following links are auto-generated but may help you locate newer content:
This is a quickie I created whilst working on something else. It allows you to copy a shortened url (urltea, tinyurl, etc.) and hit a key combo to display its destination URL in large type. It could be modified to do a few other things such copying back to the clipboard and could take input in ways other than the clipboard. It’s essentially just a shell command and doesn’t even have to use applescript or quicksilver. Anyway…
Create a new hotkey trigger in Quicksilver preferences. Insert this in the first box of the quicksilver pane (Thanks to Alex for the correction):
tell application "Quicksilver" to show large type (do shell script "curl -Is `pbpaste` | awk '/Location/ { print $2 }'")
Then choose “Run as Applescript” for the action. Assign a hotkey and then go out to Twitter and right click/copy a shortened URL. Hit your key combination and you can preview where the link is going to take you without clicking it. Tinyurl does, of course, have a preview mode, but this is faster, and uses Quicksilver goodness. 
grep Location | awk ‘{print $2}’
can be shortened to
awk ‘/Location/ { print $2 }’
It seems so obvious when you say it ;). Thanks.
Thanks for the tip. This really saves time. Greetings
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
3 Comments
Jump to comment form | comments rss [?] | trackback uri [?]