linuxusers.in is a Fediverse instance that uses the ActivityPub protocol. In other words, users at this host can communicate with people that use software like Mastodon, Pleroma, Friendica, etc. all around the world.

This server runs the snac software and there is no automatic sign-up process.

Admin email
dharmiik@proton.me
Admin account
@dharmik@linuxusers.in

Search results for tag #linux

Linux boosted

[?]learnbyexample »
@learnbyexample@programming.dev

Linux boosted

[?]petsoi »
@petsoi@discuss.tchncs.de

Linux boosted

[?]harsh3466 »
@harsh3466@lemmy.ml

[Question] In vim I can't type the ~ character

I’m hoping someone can help me with this.

I was holding my laptop while I had a vile open in vim, and I slipped, mashing a bunch of keys on the keyboard by mistake.

After doing this, I can’t type the ~ character anymore. Anytime I try to type it, it jumps the text putting focus on the line the cursor was on where I was trying to type.

I’ve searched and had no luck finding out what I did to cause this behavior. I also tried looking through the vim manpage and couldn’t find any info there either.

Hoping someone knows what the heck I did. Thank you!

(https://lemmy.ml/c/linux)

[?]N0x0n »
@N0x0n@lemmy.ml

[Question] Sed and regex string manipulation

Hi everyone !

I’m in need for some assistance for string manipulation with sed and regex. I tried a whole day to trial & error and look around the web to find a solution however it’s way over my capabilities and maybe here are some sed/regex gurus who are willing to give me a helping hand !

With everything I gathered around the web, It seems it’s rather a complicated regex and sed substitution, here we go !

What Am I trying to achieve?

I have a lot of markdown guides I want to host on a self-hosted forgejo based git markdown. However the classic markdown links are not the same as one github/forgejo…

Convert the following string:

[Some text](#Header%20Linking%MARKDOWN.md)

Into

[Some text](#header-linking-markdown.md)

As you can see those are the following requirement:

  • Pattern: [Some text](#link%20to%20header.md)
  • Only edit what’s between parentheses
  • Replace space (%20) with -
  • Everything as lowercase
  • Links are sometimes in nested parenthesis
    • e.g. (look here [Some text](#link%20to%20header.md))
  • Do not change a line that begins with https (external links)

While everything is probably a bit complex as a whole the trickiest part is probably the nested parenthesis :/

What I tried

The furthest I got was the following:

sed -Ei 's|\(([^\)]+)\)|\L&|g' test3.md #make everything between perentheses lowercase

sed -i '/https/ ! s/%20/-/g' test3.md #change every %20 occurrence to -

These sed/regx substitution are what I put together while roaming the web, but it has a lot a flaws and doesn’t work with nested parenthesis. Also this would change every %20 occurrence in the file.

The closest solution I found on stackoverflow looks similar but wasn’t able to fit to my needs. Actually my lack of regex/sed understanding makes it impossible to adapt to my requierements.


I would appreciate any help even if a change of tool is needed, however I’m more into a learning processes, so a script or CLI alternative is very appreciated :) actually any help is appreciated :D !

Thanks in advance.

(https://lemmy.ml/c/linux)

Linux boosted

[?]rhabarba »
@tux0r@feddit.org

How can I use line continuations in GNU awk?

For a reason not worth mentioning here, I would like to write a somewhat more complex awk script in which I would have to explain in detail what I am doing. (If only so that I’ll still know next week.) There doesn’t seem to be a way to wrap a list of conditions in GNU awk, right?

This is what I tried:

command-that-prints-a-table | awk '
    NR>1 &&                # Skip line 1
    NF>2 &&                # Skip lines with only one column
    substr($1,1,1) != "("  # Skip lines that start with a "("
    { print $1 }
'

Alas, that does not work - awk skips the conditions entirely and only runs print $1. It seems that escaping the newlines does not work either, which makes sense as the end of the lines are comments.

This would work:

command-that-prints-a-table | awk '
# - Skip line 1
# - Skip lines with only one column
# - Skip lines that start with a "("
    NR>1 && NF>2 && substr($1,1,1) != "("  { print $1 }
'

But - my original code has a few more conditions - it is rather annoying to read and maintain. Is there an elegant way to fix this?

(https://lemmy.ml/c/linux)

Linux boosted

[?]petsoi »
@petsoi@discuss.tchncs.de

Linux boosted

[?]petsoi »
@petsoi@discuss.tchncs.de

postmarketOS in 2025-01: systemd in edge, mobile-config-thunderbird and Lomiri

(https://lemmy.ml/c/linux)

[?]Changelog »
@changelog@changelog.social

Wild is a linker for with the goal of being very fast for iterative development.

github.com/davidlattimore/wild

    [?]HoldMyType »
    @xameer@mathstodon.xyz

    bug free =/= reliable runtime [SENSITIVE CONTENT]

    Even if nscd’s code is 100.00% perfect and bug-free, it can still suffer from bugs in libraries it calls.

    As designed, it’s a multithreaded program which calls NSS libraries. These libraries are not part of libc, they may be provided by third-party projects (samba, ldap, you name it).

    Thus nscd cannot be sure that libraries it calls do not have memory or file descriptor leaks and other bugs.

    Since nscd is multithreaded program with single shared cache, any resource leak in any NSS library has cumulative effect. Even if a NSS library leaks a file descriptor 0.01% of the time, this will make nscd crash or hang after some time
    nscd protocol is internal to glibc, with no stability guarantees

    jameshfisher.com/2018/02/05/do

      Linux boosted

      [?]petsoi »
      @petsoi@discuss.tchncs.de

      [?]Hacker News 50 » 🤖
      @hn50@social.lansky.name

      Linux boosted

      [?]MazonnaCara89 »
      @MazonnaCara89@lemmy.ml

      Linux boosted

      [?]Zenlix »
      @Zenlix@lemm.ee

      Discord Update that enables Streaming on Wayland

      A few weeks a go discord on linux had an update that enabled you to do screensharing on wayland even with audio.

      There are a few bugs. For example, you can not change the window and sometimes have to reactivate the audio check box to have the audio work. Sadly the flatpak could not shit that update, because the chromium version shipped has to major bugs in flatpaks (issue).

      But the stable .deb has now working screen sharing with audio. That is something that x11 does not have.

      (https://lemmy.ml/c/linux)

      Back to top - More...