Комментарии:
Great scripting langauge. Now, need to update this programming language for machine learing too. Any movement for that?
ОтветитьWell, this was awkward
ОтветитьI’ve been using awk to do value-based filtering on larger-than-memory CSVs. A lifesaver!
ОтветитьIt's convenient and natural because he's used it so long it is "burned" in to his brain. For me, perl is the same. I've used it so much that i quickly conceive of solution.
Ответитьyes, cygwin is great!
ОтветитьI started a new job once and the boss (who was a Windows user) was showing me the ropes. First task every morning he said was to rename and organize hundreds of files that auto-downloaded every night. He proceed to show me by manually renaming a file and dragging and dropping it to a correct folder based on part of the file name. He said he spent 1.5 hrs every morning doing this. I wrote an awk script in 10 mins that did the job in 5 secs. He couldn't believe it. I said "I just saved you over $10K / year in labor... I hope I'll see some of that in my raise after my 3 month probation period"! And I did...
ОтветитьIt's sad that Bill Gates gets so much misguided credit (and wealth) by the common man as being a programming "genius" when IMHO he never innovated one single thing while REAL programming giants like Kerighan, Richie, Stallman, Wall, etc. remain largely unknown.
ОтветитьI use awk often, both as a quick command-line tool and for programming more involved data processing tasks. Not mentioned, but along with most utilities, awk is standard on all Macs since (more or less) forever.
ОтветитьI use awk sed and grep on a daily basis
Ответитьfor i in $(find . | grep -e '\.<file extension>' ); do wc -l $i; done | awk '{sum+=$1}END{print sum}'
That is my command for counting lines in source code lines.
There is probably a better way to do it, but it gets the job done.
WSL is great. I even got archlinux and i3-wm running on windows now. I can flip back and forth just by switching a workspace.
Of course, it is not a substitute for linux, but it is good to have it integrated on windows.
It is great for programming, because it is so much easier to download software with linux and keep things up to date.
I have some software in windows that I can't live without, unfortunately.
I'll just clutch my perl for those sorts of things ;~)
ОтветитьListening to Brian Kernighan is like listening to everything that is right!!!
ОтветитьJust wrote a script that used awk for my job today, it's an immensely useful programming language still
ОтветитьWSL (Windows Subsystem for Linux)
ОтветитьBrian: "MS-DOS was a pretty pathetic operating system"
Microsoft has left the chat
I remember being rescued by grep and awk in the 90's. I'd accidentally did a chown -r .* in the /usr/users filesystem as root, one of those 4am on Monday mornings mistakes you make when doing some out of hours says admin, and affected hundreds of users that would turn up in a couple of hours. I quickly piped the password and groups files via the command line into grep and awk to find the affected user directories and the owner account names and create a new script that would change the ownership back. Took a few minutes to write and run, but saved me many hours to do manually. Thank you Brian - awk definitely rocks :-) and is one of my favourite UNIX tools.
ОтветитьHad to look up the acronym "AWK": The name stands for Aho, Weinberger and Kernighan. Brian is too modest to say that!
Ответить