145
Is anyone using awk?
(lemmy.world)
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
Grep is fiiiiine.
sed is okay but a little nasty, when your sed script is longer that one search-replace command you gotta ask yourself what you're doing really (yes, sed is a full-featured Turing-complete programming language, if you go far enough into the man page).
When I see awk in any stackoverflow recipe, I just say 'fuck it' and rewrite the whole thing in Python. Python is included into the minimal system image in Debian, the same as awk, but is way less esoteric, and you can do
python -e 'import os, sys; commands;'
for a one-liner console script.And if you want to talk about portability, try writing scripts for Android 4.4 ash shell. There's no
[ ]
command. You doswitch/case
to compare strings.Have you tried ripgrep?
No, and I don't think I will learn another tool for something that I can already do using grep/sed/find commands, which I know by heart.
That's fair