Question: I have a bundle version set in a file, like this:

```
"dist/app-build-v1.08": {

```

How can I sed the version number and swap it out with an incremented number?

First I'm attempting to grab the line itself, which is the third line in my bundle file.

```
BUILD=$(sed '3q;d' ./build/bundles.js)

```

Which does indeed grab the line. I found this snippet here on stack overflow:

```
's/[^0-9.]*\([0-9.]*\).*/\1/'

```

Which i'd like to use on $BUILD, but it doesn't work. The expected output for me would be 

```
$NUM = "1.08"

```

Then I'd like increment it to 1.09, rebuild the string and used `sed -i` to replace it.

Answer: 
I would suggest some re-architecting as right now you have your interface controllers doing "networking" and model work.

My recommended approach would be to create a "persistence manager" that is the WCSession delegate. Any data that is received is persisted, and then using an observer or notification pattern other parts of your code is informed of the change. They will then go ahead and re-run any data queries and update their UI if anything related to the UI they are presenting has been updated (add new entries to a table row, new item was favorited, etc).

This has many advantages such as reduced complexity in the interface controllers, better separation of concerns; but perhaps most importantly it enables your extension to run in the background (where no interface controllers are visible) yet be able to receive data, persist it and then take advantage of it next time the application is launched.
You can check for the keys of your dictionary that you send. You can use three different keys and then check whether it is the right key for the right interface controller.