If you are looking for some logic for this, ie. create a file and open if possible you could use something like this:

touch testFile &amp;&amp; vi testFile


Here testFile is created with touch. The &amp;&amp; part says if the creation was successful then open it with vi.

Also, you could just create a new file with something like vi, while opening it at the same time (this assumes you save the file after editing it).

vi testFile


Create and open file with one command?
I'm still very new to iOS development, so bear with me. 

I've got a TableView using static cells to contain options (click to check), I am able to select the cells fine. I'd like to assign a value (identifier) to each cell, so that when a cell is selected or de-selected I can add/remove it from an array. Then, once the editing has finished, use the references stored in the array to update the respective CoreData attributes.

My google skills have failed me today, so a push in the right direction would be very much appreciated.

Thanks. 
