---
title: Address Book search and Skype from the command line
date: 2011-04-13 07:12
slug: address-book-search-and-skype-from-the-command-line
categories:
- Code
tags:
- scripting
- skype
- terminal
---

[aboo]: https://github.com/chneeb/aboo
[fork]: https://github.com/ttscoff/aboo

Here's a neat little command-line utility for searching your address book: [aboo][]. It's not complex... it just takes a single word or phrase and searches your Address Book entries' names for it. It can output vcards and YAML, too. I created a [fork][] that adds a few things, most importantly I extended search to business names and notes. It also does a better job of realizing there's no proper name and substituting the Company name in the output, if it exists. There's a [compiled binary of my fork](https://github.com/downloads/ttscoff/aboo/aboo-ttscoff-1.0.zip) on GitHub, too. Just put it in `/usr/local/bin` and run `aboo -h` to see the options.

So, I'm toying with that this morning and I get a sudden urge to be able to make a Skype phone call from the command line. I added a -p flag to `aboo` which only returns entries which have a phone number. A little `awk` on the output, and you can get a menu of people to send straight to a function that can call them with Skype. I'll skip the middle part for now, but here's a bash function for dialing a number. It accepts multiple formats of strings and tries to turn it into a standardized format for Skype (+15554321111). Usage: `skype 5555551111` or `skype "(555) 555 5124"` (it will strip the extra characters, makes it easier to paste and dial quickly).

```bash
skype () {
  number=`echo $1|sed 's/[\(\)\+ \-]//g'|sed 's/^1//'|sed 's/^/+1/'`
  osascript -e "tell application \"Skype\" to send command \"CALL $number\" script name \"CLIDIALER\""
}
```

I normally make most of my Skype calls from LaunchBar, but this will come in handy every once in a while when I'm already working in Terminal. Thought it might be handy for someone else, too.

---

Brett is a writer and developer living in Minnesota, USA. You can follow him as ttscoff. This content is supported by readers like you. [More about Brett](https://brettterpstra.com/contact.md), including social links.

Copyright © 2026 Brett Terpstra. All rights reserved.
