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)
[personal profile] pne

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.

Re: 'more and more' icon

Date: Thursday, 24 February 2005 14:49 (UTC)
ext_78: A picture of a plush animal. It looks a bit like a cross between a duck and a platypus. (Default)
From: [identity profile] pne.livejournal.com
alot of icons that end up on LJ aren't shot by that person so does that mean if she didn't fully create it you won't give her credit?

I'd take the amount of work and level of originality into consideration, at least.

For example, if someone takes a picture and merely crops it and adds a 1px black border, I don't think that's sufficient work to warrant crediting (unless the cropping or compositing was nontrivial). If someone takes three images from a web comic and animates them nicely, then they may warrant credit since animation is not something that trivial.

You mention "credit where it is due"... that was kind of what I was thinking. If you do something, then you deserve a certain measure of recognition for it, roughly proportional to the amount of work you put into it. If you do little, then the amount of recognition you can expect will be small; if you do a lot, then it will be bigger.

The icon wasn't on LJ before she brought it over because it came from a friend who knew the orginal creator of the icon. She simply got permission to use it.

So it would make sense to credit the creator in this case, if all she did was introduce it to LiveJournal.

(If merely bringing an icon to someone's attention deserves credit, then someone gacking it from another gacker would have to credit with "gacked from [livejournal.com profile] bla who gacked it from [livejournal.com profile] bla who gacked it from [livejournal.com profile] bla who added a 1px black border to an icon of [livejournal.com profile] bla's who cropped and resized it from a picture of [livejournal.com profile] bla's.)

Why she didn't credit him is because he didn't care about crediting.

Though if he did not expect credit, that particular issue is moot.

Yes she'd like credit where it is due

This is one reason why I'm trying to determine how much, if any, credit is due to whom.

I'm not against giving credit where it is due; however, I don't think that just making something into an icon is enough to merit credit. (For example, if someone grabbed my 'bus' or 'peony' icons, which I made, I wouldn't expect credit, since all I did was resize them and introduced them into LiveJournal. If someone wanted to credit me, I'd be fine with that, but I don't think I could expect it.)

But moreso she wants people to ask permission instead of stealing/taking it.

That seems fair enough.

Though "stealing" doesn't sound like the right word if it's not her icon; you said that "it came from a friend", and even that friend is not the original creator, so I'm not sure how it can be considered to belong to [livejournal.com profile] takichan or her friend.

I agree that it's polite to ask before you use an icon that someone else is using; it's the wording that I find not appropriate.

Re: 'more and more' icon

Date: Thursday, 24 February 2005 21:58 (UTC)
nameandnature: Giles from Buffy (Default)
From: [personal profile] nameandnature
See also [livejournal.com profile] stop_i_bitches.

I tend to use awk that way because it's so strongly associated with selecting fields for me, rather being a general purpose tool.

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 Tuesday, 6 January 2026 02:58
Powered by Dreamwidth Studios