Thursday, 24 February 2005

No contact

Thursday, 24 February 2005 07:18
pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)

OK, so there are quite a number of people with friends-only journals. Many of those also have one public entry that you can comment on, for example, if you want to be added, or want to contact the journal owner for some other reason.

What bemuses me is those who fall into the above category and who limit posting to their journal to "Friends" (i.e. disallow anonymous and non-friend comments). That would seem to negate the utility of such a public entry, no? At least, if comments are enabled on that entry at all... the only people who could comment could also see, and presumably comment on, the regular entries.

And if the journal owner doesn't list any contact details on their userinfo page, e.g. email or IM, then you can't get hold of them at all. Which is a valid choice, I suppose; I just find that (a) providing a public entry that seems to be for commenting on and then (b) stopping people from commenting on it seems a rather strange combination.

grep | awk

Thursday, 24 February 2005 09:54
pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)

Occasionally I see people writing little pipelines using both 'grep' and 'awk'... and it makes me wonder why you start two processes when one will do. (A bit like those who start pipelines with cat file | ... where <file ... will do just as well, and save one process.)

For example, why not replace ... | grep blurfle | awk '{ print $2 }' with ... | awk '/blurfle/ { print $2}'? Or replace ls -l | grep -v '^d' | awk '{total+=$5}END{print total}' with ls -l | awk '$1 !~ /^d/ {total+=$5} END {print total}'?

Especially since most of those recipes use a very simple argument to grep—typically a fixed string, or -v plus a fixed string—which would seem trivially convertible to part of an awk script even without having to learn the full awk language.

pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)
fc xxxxxxxxxxxxxxxr344cxxxxxxxxxxxxxxxhggggghnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnngvbfgggg xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx9uzixxxxxxxxx m, ü

Profile

pne: A picture of a plush toy, halfway between a duck and a platypus, with a green body and a yellow bill and feet. (Default)
Philip Newton

June 2015

S M T W T F S
 12 3456
78910111213
14151617181920
2122232425 2627
282930    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Saturday, 3 January 2026 16:33
Powered by Dreamwidth Studios