|
Poopernickel posted:just saw that HN post on awk - any goons actually shipping awk code for anything? link? yeah but mostly quick and dirty one off scripts and nothing crucial
|
# ? May 24, 2018 21:43 |
|
|
# ? Apr 28, 2024 20:34 |
|
OldAlias posted:link? yeah but mostly quick and dirty one off scripts and nothing crucial https://news.ycombinator.com/item?id=17140934 main article is a link to the awk book, but the comments are kind of interesting - I didn't think awk was really used much any more
|
# ? May 24, 2018 22:36 |
|
Poopernickel posted:https://news.ycombinator.com/item?id=17140934 every unix guy I have ever known has used awk at least a little for scripts and oneliners
|
# ? May 24, 2018 22:46 |
|
should i learn it? is it better than grep+sed+shell?
|
# ? May 24, 2018 22:49 |
|
it's perfect to replace grep+sed at least
|
# ? May 24, 2018 22:51 |
|
people pretty much use it for literally one purpose, and thats getting specific columns out of output or logs. of course that can be done with cut ... but awk offers extra formatting possibilities i guess its a pretty goddamn ugly language though i wouldnt bother learning it in depth
|
# ? May 24, 2018 22:52 |
|
Poopernickel posted:should i learn it? eh… nah awk is pretty neat, but you probably should just learn the equivalent perl idioms at that point. it is off there with sed, you can do a lot of really neat stuff beyond the super-basics that people know, but the limitations also crop up very quickly, and it just gets to be more annoying than helpful when you are as likely to run into a wall as you are to get a quick and easy solution for something
|
# ? May 24, 2018 22:52 |
|
Tankakern posted:it's perfect to replace grep+sed at least not true at all for sed, though you also should not learn the full extent of sed
|
# ? May 24, 2018 22:54 |
|
it's useful to pick up a bit of it, if you need to parse through / mangle a bunch of logs or textfiles or some poo poo. no need for fluency, it's just a useful tool among others
|
# ? May 24, 2018 22:57 |
|
Cybernetic Vermin posted:eh… nah i'm an embedded linux guy, and our lead architect is very , literally said "why provide Python when we've got busybox shell already", then tried to sell me on using some wack half-baked Python designed to run on microcontrollers perl might appeal to the graybeard in him, but i doubt he'd ship it on product
|
# ? May 24, 2018 23:04 |
|
sounds like you should try (g)awk then
|
# ? May 24, 2018 23:11 |
|
Awk is great if you need to go just a bit beyond grep+sed because it has variables and control flow statements and printf and stuff so you can actually make small useful scripts with it.
|
# ? May 24, 2018 23:13 |
|
if I can fit what I need in one simple awk command then I use awk Otherwise I hunker down and write it in python. All of my engineering coworkers know python so I can just hand it off with minimum explanation if I need to. I literally do not know anyone who actually writes perl code except for myself, when I had to write a module for logwatch and to debug something in spamassassin. Nothing about my exposure to it has compelled me to learn more about it. I took a unix sysadmin class in college awhile back and actually wrote an awk script complete with shebang and I doubt I would understand what it meant if I had to look at it again.
|
# ? May 24, 2018 23:28 |
|
speaking of gnarly syntax here is your occasional reminder that regular expressions are still a thing that software engineers refuse to learn until they absolutely have to because it looks so ugly but once they understand it, they try to force it on everyone else I love regular expressions but once in awhile I forget to document a complex one and it takes awhile to decode what I was trying to do
|
# ? May 24, 2018 23:32 |
|
regex is a write-only language, expecially PCRE regex
|
# ? May 24, 2018 23:46 |
|
Poopernickel posted:should i learn it? just use perl
|
# ? May 25, 2018 03:52 |
|
Wasn't awk used to power Splunk?
|
# ? May 25, 2018 05:12 |
|
who gives a goddamned poo poo
|
# ? May 25, 2018 06:48 |
|
I have met two of the letters of awk. Whelp that's my Linux story thanks for listening.
|
# ? May 25, 2018 07:40 |
|
mrmcd posted:I have met two of the letters of awk. I think you mean Bell Labs/Linux, or as I’ve taken to calling it lately, Bell Labs + Linux
|
# ? May 25, 2018 10:34 |
|
I think you mean GNU/Unix, as I’ve taken to calling it lately, GNU + Unix
|
# ? May 25, 2018 11:51 |
|
mrmcd posted:I have met two of the letters of awk. Like, literally met the letters Sesame Street style
|
# ? May 25, 2018 11:51 |
|
Poopernickel posted:just saw that HN post on awk - any goons actually shipping awk code for anything?
|
# ? May 25, 2018 18:36 |
|
Poopernickel posted:should i learn it? Yes. The real question is "when", and that's not until you have to fix someone else's awk one liner and can't figure out how to replace the the entire line with grep|cut. One day sooner and you'll find opportunities to proliferate technical debt by solving problems with a dead, esoteric language, inflicting its knowledge on others.
|
# ? May 25, 2018 19:06 |
|
despite starting my UNIX experience with SVR3 and V7 (well, MINIX) I’ve managed to entirely avoid awk and not by using Perl, either
|
# ? May 26, 2018 04:10 |
|
by the way, did you know you can make diff spit out a stream of ed commands to transform one of its arguments into the other? yeah, imagine learning this and then building tooling atop it
|
# ? May 26, 2018 04:16 |
|
awk is cool and good.
|
# ? May 26, 2018 04:40 |
|
eschaton posted:by the way, did you know you can make diff spit out a stream of ed commands to transform one of its arguments into the other? yeah, this came up in the secfuck thread recently POSIX diff/patch have an ed mode, POSIX ed has a command to run arbitrary shell code, it is two great tastes that taste great together!
|
# ? May 26, 2018 05:40 |
|
i wrote an awk script once i regretted it after i learned perl that's my story
|
# ? May 26, 2018 05:43 |
|
check out the manning book listed near the top of that hackernews thread, it focuses on perl as a pipe command in gory detail
Gazpacho fucked around with this message at 08:05 on May 26, 2018 |
# ? May 26, 2018 08:02 |
|
I've never written an awk script that wasn't single use
|
# ? May 26, 2018 08:05 |
|
Poopernickel posted:Like, literally met the letters Sesame Street style Yeah, one of them is a real Aho.
|
# ? May 26, 2018 18:18 |
|
Have any of you used fedora on a pi3 before? I put the fc28 server image on mine and it's way slower than raspbian, but I cant figure out why. I don't see anything in the background eating up cpu time or IO.
|
# ? May 29, 2018 00:26 |
|
total guess: with an arm soc there's a chance you need a special driver to do dynamic clock frequency management, so it might just be stuck at the lowest power saving clock freq or something
|
# ? May 29, 2018 01:58 |
|
i've got a pi 2 with cent 7 on it and i saw the same thing. my java server used to start slowly but acceptably on rasbian, now it takes forever e: the cpu thing might be involved? lscpu says it maxes out at 700mhz but the specs say it should be 900... carry on then fucked around with this message at 02:34 on May 29, 2018 |
# ? May 29, 2018 02:31 |
|
fedora is more suitable as a desktop anyways, 6month release is annoying and you might have to fiddle with selinux a bit (not a real problem tho)
OldAlias fucked around with this message at 03:03 on May 29, 2018 |
# ? May 29, 2018 03:00 |
|
brand engager posted:Have any of you used fedora on a pi3 before? I put the fc28 server image on mine and it's way slower than raspbian, but I cant figure out why. I don't see anything in the background eating up cpu time or IO. Raspbian includes some custom patches to use the Raspberry Pi's hardware features (like the DMA engine) to accelerate some general desktop graphics processing. If Fedora doesn't include those patches that could explain the difference in performance.
|
# ? May 29, 2018 03:37 |
|
huh ecryptfs is real good and easy to set up, cant believe i didnt do this sooner started with just a encrypted area in Private, then moving directories into there and symlinking those to the "real" directories, like 'mv .thunderbird Private/thunderbird; ln -s Private/thunderbird .thunderbird' and now realizing i may as well just encrypt my whole home directory
|
# ? Jun 4, 2018 18:04 |
|
Lysidas posted:huh ecryptfs is real good and easy to set up, cant believe i didnt do this sooner two things about ecryptfs to know you should backup your data OR backup your ecryptfs metadata, because if that’s toast, then you’re toast long and weird filenames do not work in ecryptfs. I have been bit by that a few times in my life but that was because of coworkers who wanted to turn the entire sentence of a document into the document’s filename and then svn complained when I tried to update
|
# ? Jun 4, 2018 21:30 |
|
|
# ? Apr 28, 2024 20:34 |
|
ubuntu is, for whatever reason, removing ecryptfs from the default install but I think enough people like it that it will never be impossible to keep using it... it just adds some inertia for new users for ecryptfs
|
# ? Jun 4, 2018 21:31 |