linux

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

OmnislashIsACloudApp, in Is anyone using awk?

I use awk all the time. a very common and probably simplest reason I use it is it’s ability to handle variable column locations for data.

if you know you always want the last field you can do something like

awk ‘{print $NF}’

but usually using it as for performing more advanced operations all in one go without having to pipe something three times.

sure you can do grep cut grep printf, but you can instead do the pattern matching, the field, the formatting, whatever you need to all in one place.

it’s also got a bunch of more advanced usage of course since it’s its own language. one of my favorite advanced one liners is one that will recognize if it is going to print a duplicate line anywhere in your output and prevent it. in cases where you don’t want to sort your output but you also want to remove duplicates it is extremely helpful and quick rather than running post-processing on the output in another way.

all that said main reason I use it is because I know it and it’s fast, there’s nothing you can do in awk that you can’t do in Python or whatever else you’re more comfortable with. The best tool for the job is the one that gets it done quickly and accurately. unless your environment is limited and it prevents the installation of tools you’re more familiar with then there’s no real reason to use this over Python.

UNWILLING_PARTICIPANT, in Is anyone using awk?

I use awk a good bit. Not as much as when I was doing data work, though. It’s better than cut at splitting on whitespace in many contexts. Lots of other nice uses like variable scope, regex, and summing

maniel, in Linux Boomers
@maniel@lemmy.ml avatar

Naughties…

conciselyverbose,

By far the most offensive part of this complete and utter shit post.

JaneTheMotherfucker,

Yeah, that’s what 00-09 is called

rizoid, in Bluetooth problems on my Surface Go 1 running Fedora 39
@rizoid@lemmy.dbzer0.com avatar

I’m not familiar with any differences the surface go might have from other surfaces I have used but the surface kernel has always fixed every issue I have had with them. I currently use a surface laptop 4 and I can’t even use Bluetooth without the surface kernel. As far as breaking the install goes, the instructions for installation and switching are truly as simple as copy and pasting 5 or 6 terminal commands. I really would recommend the surface kernel before any other fixes.

Dariusmiles2123,

Okay thanks for the answer. I guess I’ll try it and come back here if it doesn’t work.

Just a question, is the surface kernel auto updating?

rizoid,
@rizoid@lemmy.dbzer0.com avatar

It should update whenever you run a dnf update in the terminal

Dariusmiles2123,

Sorry to annoy you but it means it’s not gonna update when I update the distro via the graphical interface?

rizoid,
@rizoid@lemmy.dbzer0.com avatar

Not to my knowledge but every desktop environment has a different software diwnloader. For me it doesnt update through Discover on KDE.

Dariusmiles2123, (edited )

Thanks a lot. I’ve now installed the surface kernel. Sadly it still takes a long time for my mouse to be recognized.

That’s not necessarly a problem if it got rid of the disconnection problem at least.

umbraroze, in Linux Boomers
@umbraroze@kbin.social avatar

So yeah, Xfce looks the same as it did 10 years ago.

And?

Desktop environment is meant to launch apps and give me windows and maybe have a file manager. Xfce does that. It's a desktop environment.

Hey, "modern" desktop environment enthusiasts, if you bring Compiz back from the dead, give us luddites a call, will you? Ohhhh you kids should have seen it back in the day. Windows and Mac users saw Compiz in action and were, like, "wat." You don't get them to react that way to modern Linux desktops, no. And all that is lost now. Thanks Wayland.

wim, in I've started building a TUI for Lemmy

Have you considered supporting Sixel for images?

en.wikipedia.org/wiki/Sixel

FangedWyvern42, in Could 2024 be the year of the diagonal linux desktop?
@FangedWyvern42@lemmy.world avatar

Mods, remove his balls

DarkGamer, (edited ) in Linux Boomers
@DarkGamer@kbin.social avatar

I really hate this usage of the term, Boomer. Words mean things!

mogoh,

It’s so stupid. Everything is boomer now.

Naich, (edited ) in Linux Boomers
@Naich@kbin.social avatar

This has already been deleted once. Reported as spam.

vzq,

Day old account posting spam? Inconceivable!

LainOfTheWired,
@LainOfTheWired@lemy.lol avatar

I don’t know if Lemmy can do it yet, but I remember Reddit and also Facebook( I think) lets you set a minimum account age to post in a community. So we might want to get our mods to do that.

umbraroze,
@umbraroze@kbin.social avatar

Oh content from this blog has been popping up in random places. Methinks it's le epic trole.

JaneTheMotherfucker,

I just want to post my epic opinions in places where they matter.

JaneTheMotherfucker,

Lemmy.world deleted it on their Linux group because they’re idiots.

Junkers_Klunker, in Linux Boomers

This is so incredibly cringe that its downright unreadable. Take your own advise, use whatever you want and shut the fuck up.

velox_vulnus, (edited ) in Linux Boomers

For someone who hates these “Linux boomers”, you’re using Wordpress, which uses the good old PHP.

Shouldn’t you be working on your own minimal Gopher website or something like Rust-SWC, with all that fancy hydration and hybrid SSR-SSG framework?

People can have opinions. You, on the other hand, need to mind your business.

And yes, I’ll take your advice and move over to Guix. Shepherd and Guille looks pretty fine to me.

hackerwacker, in Linux Boomers

I’ve tried GNOME 45 extensively and I just don’t see how it’s better.

Even looking at the screenshots I don’t understand how GNOME 45 is better than GNOME 2. It doesn’t even LOOK better. You need extensions to get basic functionality like a window list and tray icons.

Then there’s the bad parts, like every window now has different decorations, doesn’t work with nvidia, etc.

There’s nothing wrong with angryposting, but it needs a kernel of truth which this is missing.

throwawayish, in Linux Boomers

Username checks out

TechieDamien, in Live (Animated) wallpapers programs for linux

I set mpv as the root window which worked well. I stopped using it a while back, but if you are interested, I could dig up the simple script for you (literally one or two lines iirc).

manito_manopla,
@manito_manopla@lemmy.ml avatar

Ok, give me the script, please

TechieDamien,

Sure. If you are using an nvidia optimus laptop, you should also add __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia at the start of the last line when running in hybrid mode to run mpv on the dgpu. You should have a file at ~/.wallpaperrc that contains wallpaper_playlist: /path/to/mpv/playlist. You may want to add this script to your startup sequence via your wm/de.


<span style="color:#323232;">#!/bin/sh
</span><span style="color:#323232;">
</span><span style="color:#323232;">WALLPAPER_PLAYLIST=$(cat ~/.wallpaperrc | grep -v '^w*#' | grep 'wallpaper_playlist' | sed "s/wallpaper_playlist: //")
</span><span style="color:#323232;">
</span><span style="color:#323232;">
</span><span style="color:#323232;">xwinwrap -g 1920x1080 -ov -- mpv -wid WID --no-osc --no-audio --loop-playlist --shuffle --playlist=$WALLPAPER_PLAYLIST
</span>

Hope this helps!

Ramin_HAL9001, (edited ) in Is anyone using awk?

I used to use the command line, Bash, Awk, Sed, Cut, Grep, and Find (often piped to one another) quite often. I can recall that the few times I used Awk was usually for collating lines from logs or CSV files.

But then I switched to using Emacs as my editor, and it gathers together the functionality of all of those tools into one, nice, neat little bundle of APIs that you can easily program in the Emacs Lisp programming language, either as code or by recording keystrokes as a “macro.”

Now I don’t use shell pipelines hardly at all anymore. Mostly I run a process, buffer its output, and edit it interactively. I first edit by hand, then record a macro once I know what I want to do, then apply the macro to every line of the buffer. After that, I might save the buffer to a file, or maybe stream it to another process, recapturing its output. This technique is much more interactive, with the ability to undo mistakes, and so it is easier to manipulate data than with Awk and shell pipelines.

netwren,

This is fascinating to me. Do you have any links or suggestions for this workflow to learn more?

Ramin_HAL9001, (edited )

This is fascinating to me. Do you have any links or suggestions for this workflow to learn more?

I am glad you asked, because I actually wrote a series of blog posts on the topic of how Emacs replaced my old Tmux+Bash CLI-based workflow. The link there is to the introductory article, in the “contents” section there are links to each of the 4 articles in the series. The “Shell Basics” (titled “Emacs as a Shell”) might be of particular interest to you.

If you have any specific questions, or if you have recommendations for something you think you would like to learn from one of my blog posts, please let me know. I would like to write a few more entries in this blog series.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #