Actions

Blog/July 2013/Jul 19th

From RonWareWiki

< Blog‎ | July 2013
Revision as of 12:25, 26 July 2013 by Ron (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Jul 19th (See this week's devar torah) Comments or questions? Click here!


Hi, again!

Victory! After a somewhat pointlessly long process, I managed to convince the CEO to let me work "half-time". So I maintain an income stream (albeit half what it was), and gain free time to build up my business and work on the products I want to develop. Actually, the CEO only agreed to "try it for a month"... so it may be that I only get one month of this arrangement before heading back to the negotiation table. In the meantime, I need to make hay while the sun shines!

Besides dealing with our post-9'th-Av laundry pile, Esther continued attending the "small business course". Most of the information they're giving is not new to her, though the Hebrew terminology is. She gets a bit frustrated at her fellow "students" who needlessly argue with the instructor. "Needlessly", because they clearly don't know what they are talking about. I feel her pain.

Our new-immigrant guest Dinah has already started an ulpan, and has also started looking for an apartment. Leaving the nest so quickly! Our daughter Sarah has been so busy with her filming work this week, that we've only seen her twice. We think she's still in the Land, but can't swear to that. Daniela and Jeremy have, after only a year of marriage, needed to expand their bookcase collection in order to accommodate their scholarly tendencies. I'm jealous! And nephew Chris has been having a great time on his yeshiva-study program; we look forward to seeing him next week.

extreme geekiness follows:

One of the guys at work came to me, desperately seeking a solution to a seemingly simple problem: "how can I grab the data from a file, starting from the last occurrence of some text, until the end of the file"? He came to me because, well... you know.

So I did what I always do, first off: check Google to see what others have come up with. Though I found solutions for first occurrence-to-end-of-file (which is trivial), I couldn't find the other. So I broke the problem into two parts: (1) find the line number of the last occurrence of the text, and (2) dump the file from that point to the end.

Finding a bit of text in a file is easy. Just use grep. So the first part is like this (looking for the string 'foo' in the file 'thefile'):

grep -n foo thefile | tail -n 1 | cut -d: -f1

This little bit says 'find foo in thefile, with line-numbers, and then take the last line of what you found, and snip off the number at the front'. So the result is just the line number of the last occurrence of the text being looked for. How can you use that? It turns out you can also tell 'tail' to dump from a line number. So you grab the previous information and give it to tail:

tail -n+`grep -n foo thefile | tail -n 1 | cut -d: -f1` thefile

Voilà! There might be an easier way to do it, but this is pretty cool. And it demonstrates how to piece together the unix command-line tools to accomplish bigger tasks. Sorry for the diversion...

What else? Well:

Those in power always seek more power. Once they have acquired that power, they don't give it up willingly. Oh sure, everyone is now aware of what the more paranoid among us have been saying for years... that the gov't is, in fact, collecting your private information. Do you really think they will stop collecting it because it's illegal for them to do so? If you really do, I've got some prime beach-front property here in Maʿale Adummim for sale, dirt cheap. Trust me...

Next week I hope to have a few more articles written for my site, explaining what you can do about all this. I'll be working on putting the finishing touches on the site by the start of August, when I become "half-freeman, half-slave" (I've been waiting to use that halakhic term, even though it's not really appropriate). Until then, you'll have to be patient.

Finally! We're back to a "normal" shabbat at home. No guests this week, we'll serve up:
kebabs, mushroom soup, veggie burgers, beet salad, potato salad, egg salad, and a dessert platter from our wonderful meḥutanim


Until next week,
shabbat shalom!



Top: Blog Prev: Jul 12th Next: Jul 26th