Pull iTunes App Categories via Bash

I love bash one-liners. Here’s one it took me a bit to get just right that will pull the Category of an app based on the URL of the app.

curl -s 'https://itunes.apple.com/us/app/self-service-mobile/id718509958?mt=8' | grep -Eo '"applicationCategory":.*?[^\\]",'

If you don’t already have the URL for an app, it can be obtained via a lookup using

curl https://itunes.apple.com/lookup?id=718509958

If you’ll be performing these kinds of operations en masse from within server-side scripting, Apple has a number of programs, including the Affiliate Program, which allow you to do so more gracefully. But as a quick and dirty part of a script, this could solve a need. More importantly, hey, parse some json from bash without piping to python or perl or whatevers… Enjoy!

Duplicating Flash Drives

Ever need to distribute a whole lot of flash drives? Need to copy data to thousands of drives? Daunting. There are a ton of services that can do the dirty work for you for a few dollars per drive, but most include that in a markup to sell you the drive and charge for printing on the drives whether you want to or not. If you have the drives and want to do the dirty work yourself then that 4 port USB hub and that copy of Carbon Copy Cloner is going to get old fast. Lucky you, there are a number of solutions that will do the work for you. Aleratac is your friend. The 21 port USB Flash Drive Copy Cruiser is a portable device that will copy from one drive to 20 other drives. If you have a much larger project then look into the 118 port model. It’s a beast but it will duplicate 118 drives concurrently. So if you’ve got a big deployment coming up, think about it – you can duplicate those deployment jump drives all on your own!