I was following a tutorial from AppCoda (fantastic site btw) when it asked you to enter the following line:

recipeImages = [NSArray arrayWithObjects:@"angry_birds_cake.jpg", @"creme_brelee.jpg", @"egg_benedict.jpg", @"full_breakfast.jpg", @"green_tea.jpg", @"ham_and_cheese_panini.jpg", @"ham_and_egg_sandwich.jpg", @"hamburger.jpg", @"instant_noodle_with_egg.jpg", @"japanese_noodle_with_pork.jpg", @"mushroom_risotto.jpg", @"noodle_with_bbq_pork.jpg", @"starbucks_coffee.jpg", @"thai_shrimp_cake.jpg", @"vegetable_curry.jpg", @"white_chocolate_donut.jpg", nil];

Now that’s a mouthful. If you are reading on the same computer that you are working from you can obviously just copy/paste that. But I was reading on another device while coding on my MBP.

These images all come from a zip that they provide for you that you extract and copy into your project. This reminded me of an old post that I had on another blog regarding useful linux one liners. Unfortunately that post/blog is no longer around so here’s one that would help in this situation or while working on other projects.

for x in ls `*.jpg`; do echo @\"$x\",; done;

Running this from their supplied images folder would produce:

@"angry_birds_cake.jpg",
@"creme_brelee.jpg",
@"egg_benedict.jpg",
@"full_breakfast.jpg",
@"green_tea.jpg",
@"ham_and_cheese_panini.jpg",
@"ham_and_egg_sandwich.jpg",
@"hamburger.jpg",
@"instant_noodle_with_egg.jpg",
@"japanese_noodle_with_pork.jpg",
@"mushroom_risotto.jpg",
@"noodle_with_bbq_pork.jpg",
@"starbucks_coffee.jpg",
@"thai_shrimp_cake.jpg",
@"vegetable_curry.jpg",
@"white_chocolate_donut.jpg",

It’s a pretty simple use of find but maybe people will find it helpful.