5 ms·
I've never bothered to learn much AWK, but that's mostly because Perl is my bread and butter language and has been for 20 years, and focusing on knowledge of th
by kbenson 5y ago
I've never bothered to learn much AWK, but that's mostly because Perl is my bread and butter language and has been for 20 years, and focusing on knowledge of that seemed a better investment (especially since with a few judicious flags, Perl is a passable AWK replacement even for very small one liners).
That said, if you just want to supplement your knowledge of other shell tools and pull out something that can do some obvious text munging, AWK has always looked attractive for the task to me.
- chasil 5y agoThe problem is that awk is in POSIX, and perl is not. There are two common sources of awk for Windows, for example, that drop one exe to provide the interpreter: http://unxutils.sourceforge.net/ http://unxutils.sourceforge.net/ https://frippery.org/busybox/ https://frippery.org/busybox/ Perl simply wasn't designed to do that.
- newaccount2021 5y agoBut perl is available by default in almost every free *nix, and for most people, Windows isn't a requirement
- sigzero 5y agoUsually not a requirement but it's a "nice to have" sometimes.
- chasil 5y agoIn HP-UX 10.20, there was a single perl4 binary that dates from 1993 in /usr/contrib/bin (I checked our K380). Had Perl held to a single binary, it could be inside busybox. Perl cannot be inside busybox, and that hasn't been possible since 1993.
- sigzero 5y agohttps://sourceforge.net/projects/ezwinports/files/ https://sourceforge.net/projects/ezwinports/files/ Has a recent version of GAWK (Gnu AWK). I think if you install git for Windows, you get AWK as well.
- metaphor 5y ago> I think if you install git for Windows, you get AWK as well. Yes, but you also get perl there too.
- popcube 5y agosorry, why this is different to install perl? they look like still need download. I s this because they were contained in larger tool box so more easier get awk by other reasons? p.s., thanks, I don't know I had have awk in git bash...
- mung1 5y agoThis comment reminds me of the joke about the sewage worker, who is chatting about his job and says 'to you it maybe just shit, but to me its my bread and butter'. Internet always seems the similar, pipes|garbage in| and munging on urban dictionary.....