the order of redirections is significant


In bash, if you put:

ls /Users/*/.ssh/id_rsa 2>&1 > rsa-keys.log

...you're redirecting stderr to the stdout's destination while stdout is still sending output to the screen. So any permission errors encountered will go to the screen, not to rsa-keys.log.

From the bash manpage:

==================

Note that the order of redirections is significant. For example, the command

   ls > dirlist 2>&1

directs both standard output and standard error to the file dirlist, while the command
   ls 2>&1 > dirlist

directs only the standard output to file dirlist, because the standard error was duplicated from the standard output before the standard output was redirected to dirlist.

==================

Commands given to the shell are evaluated and processed in a specific order and fashion, and this is one quirk of that that many people are unaware of.

A power utility is reporting suspected pot growers to cops. EFF says that’s illegal.


According to a motion the Electronic Frontier Foundation filed in Sacramento Superior Court last week, Nguyen and Decker are only two of more than 33,000 Sacramento-area people who have been flagged to the sheriff’s department by the Sacramento Municipal Utility District, the electricity provider for the region. SMUD called the customers out for using what it and department investigators said were suspiciously high amounts of electricity indicative of illegal cannabis farming.

Urgency to Switch from Windows 10 Builds


The openSUSE Project is part of a growing coalition of open-source advocates urging Microsoft users to install a Linux operating system as Microsoft prepares to end support for Windows 10 this October, and urgency to get that message out is building.

Some in the IT industry are suggesting that as many as 50 percent of the devices remain using Windows 10, which comes at great risk to users and businesses.

Those who remain on Windows 10 and don’t upgrade to an operating system providing security and maintenance updates like a Linux OS or Window 11 will be susceptible to vulnerabilities, malware infections, software incompatibilities, and an increasing amount of system instability and failures over time.

The End of 10 campaign and its initiative aims to promote migration-focused type events to help these users shift from Windows 10 to Linux-based operating systems.

The amount of PCs that will become unprotected on October 14 is unprecedented, and getting people to migrate to Linux operating systems like openSUSE’s is reaching a critical juncture as millions face the looming deadline this Fall.

October 14 is just 12 weeks away and the end-of-support deadline for Windows 10 will expose those who have not migrated to increasing cyber threats.

In additions to the the threats, a big part of the End of 10 movement emphasizes environmental responsibility, digital sustainability and long-term cost savings for those with aging computers that could potentially end up recycled or in landfill.

End of 10 advocates and supporting organizations like NextCloud, REPAIR CAFE, KDE, GNOME, FSFE, EU OS and several other organizations would prefer users find a Linux solution for their older hardware rather than have this event create an environmental disaster. Installing Linux on these old systems can breathe new life into perfectly functional machines that may otherwise be discarded.

Several open-source software projects and organizations and been collaborating for more than a year to create unified resources, tutorials, migration tools and support channels to help lower the barrier to entry for those who seek to install a Linux new operating system.

Members of the openSUSE community and others have been vocal about appealing to Windows 10 users that can’t upgrade their devices to Windows 11.

For those ready to act, the campaign website has resources available and links to community events to help people install Linux.

Anyone who wants to install an openSUSE distribution can follow this A Step-by-Step Guide.

The message to Windows 10 users is clear; don’t replace your computer; reimagine it!

Fedora Weighs Dropping Release Criteria For DVD Optical Media


Question About Bash Command Grouping Behavior in Script vs CLI


Question for you all.

I was working on a bash script and working out some logic for command chaining and grouping for executing different functions in my script based on the return status of other functions.

I know you can group commands with (), which spawns a subshell, and within the grouping you can chain with ;, &&, and ||.

I also know that you can group commands with {}, but, within the curly braces you can only separate commands with ;.

EDIT: the above statement of the curly braces only allowing ; is incorrect. I misunderstood what I had read. @SheeEttin@lemmy.zip pointed out my mistake.

The requirement is that the list of commands in the curly braces needs to be terminated with a semicolon or a newline character, and in the script, I unknowingly was meeting the rules by using the newlines to make the code easier to read for myself.

END EDIT:

In the script, for readability I did group the commands across lines kind of like a function.

The script is pretty simple. I created a few functions with echo commands to test the logic. the script asks for input of foo or bar. The first function has an if, and if the input is foo, it executes. If it's bar it returns 1.

The return of 1 triggers the or (||) and executes the second command group.

The idea was, if the user inputs foo, the first group triggers printing foo baz to stdout. If the user inputs bar, the foo function returns 1, the baz function does not execute, the or is triggered, and bar but is printed to stdout

Here's the script (which executes as described):

Can anyone explain why I'm able to group with curly braces and still use && inside them?

(Also, the reason I want to use the curly braces is I don't want to spawn a subshell. I want variable persistence in the current shell)

\#! /usr/bin/bash

# BEGIN FUNCTIONS #

foo () {

    if [[ "${input}" = foo ]]; then
        echo "foo"
        return 0
    else
        return 1
    fi

}

bar () {

    echo "bar"

}

baz () {

    echo "baz"

}

but () {

    echo "but"

}

# END FUNCTIONS #

read -p "foo or bar? " input

{
    foo && 
    baz
} ||

    {
        bar &&
        but
    }
This entry was edited (1 day ago)
in reply to SheeEttin

Ah! I misinterpreted what I read! I found that exact same reference link when looking into this and I misinterpreted this:

The semicolon (or newline) following list is required


to mean that it required the semicolon as the command separator. That explains why my script works. The newline closes each group, and the other operators are allowed, the list just needs to be closed. Thank you!

in reply to SheeEttin

My environment is just my homelab. Ubuntu server on my server, Arch (btw) on my laptop. So I could go with any language , but right now I'm choosing Bash. I know stuff I'm doing would probably be easier in a different language, and maybe I'm a glutton for punishment. I just want to get really good with Bash.

The logic is Bash is gonna be available on just about any computing environment I encounter (linux especially, but even Windows with WSL and zsh on macOS (which I know is different, but still very similar). But really, I am just enjoying the hell out of learning and scripting with Bash. I'll move on to Python or something someday.

Fifteen more Palestinians die from starvation amid Israeli-imposed famine


Fifteen Palestinians died from malnutrition under an Israeli-imposed famine in the Gaza Strip in the past 24 hours, the Palestinian health ministry said on Tuesday.

Four of them were children, including three identified as the infant Yousef al-Safadi, Abd al-Jawad al-Ghalban, 16, and Ahmad Hasanat.
inian health ministry.

more questions about yt-dlp arguments on debian (excluding av1, aborting an active download not shutting the terminal down)


debian 12.11, yt-dlp stable@2025.07.21

aim: to download the best video available with the largest height but no better than 1080p, excluding av1 as well.

What works:

yt-dlp -f bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4] -S height:1080 --all-subs


but this command downloads, if possible, av1, which target hardware doesn't support for longer than 5 minutes.

Argument I don't know to add correctly:

[vcodec!*=av01]


I tried:

yt-dlp -f bv[ext=mp4]+ba[ext=m4a]/b[ext=mp4][vcodec!=av01] -S height:1080 --all-subs


and other variations, but it didn't work.

second question, aborting an active download not shutting the terminal down: neither ctrl+c nor ctrl+q work and opening htop to kill the process seems overkill. What I now do is to simply shut the active tab, but there must be a faster way.

This entry was edited (1 day ago)
in reply to merompetehla

I think AVC1 is another word for H.264. That's the oldest one with lots of hardware acceleration available in old devices and by far the biggest one in file size. VP9 should roughly be on a similar level with H.265. The main difference is that VP9 is supposed to be royalty-free and H.265 isn't. The best one is of course AV1. But that also takes considerably more resources to encode and decode.
This entry was edited (1 day ago)

Trying Guix: A Nixer's Impressions


One aspect of Guix I found to be really fascinating: That there is basically no conceptual difference between defining a package as a private build script, and using a package as part of the system.

Let me explain: Say you wrote a little program in Python which uses a C library (or a Rust library with C ABI) which is in the distribution. Then, in Guix you would put that librarie's name and needed version into a manifest.scm file which lists your dependency, and makes it available if you run guix shell in that folder. It does not matter whether you run the full Guix System, or just use Guix as s package manager.

Now, if you want to install your little python program as part of your system, you'll write an install script or package definition, which is nothing else than a litle piece of Scheme code which contains the name of your program, your dependency, and the information needed to call python's build tool.

The point I am making is now that the only thing which is different between your local package and a distributed package in Guix is that distributed packages are package definitions hosted in public git repos, called 'channels'. So, if you put your package's source into a github or codeberg repo, and the package definition into another repo, you now have published a package which is a part of Guix (in your own channel). Anybody who wants to install and run your package just needs your channel's URL and the packages name. It is a fully decentral system.

In short, in Guix you have built-in something like Arch's AUR, just in a much more elegant and clean manner - and in a fully decentralized way.

This entry was edited (1 day ago)
in reply to HaraldvonBlauzahn

One aspect of Guix I found to be really fascinating: That there is basically no conceptual difference between defining a package as a private build script, and using a package as part of the system.


This is true for Nix as well.

The two main advantages of Guix are the language (which is well-known and comes with lots of good tooling and other support) and the package bootstrapping.

in reply to balsoft

The two main advantages of Guix are the language


I wouldn't call that an advantage for the average person. Nix is far nicer to work with. Some Lispers might disagree, but I, for one, can't exactly see the beauty in trying to turn Scheme into a configuration language with macros and hacks. Also Guix puts Scheme everywhere, things you can do with plain old Bash in Nix, you'll have to all do in Scheme in Guix, so there is a much steeper learning curve.

in reply to balsoft

Plus, if one compares the full bash man page with an introduction to Scheme - I love the quick introduction into racket with pictures - one can come to the conclusion that Schemes are both a lot simpler and more powerful.

In the end, it is pretty much a matter of taste, previous experience, and practical needs what one prefers.

This entry was edited (1 day ago)
in reply to msherburn33

Some Lispers might disagree, but I, for one, can't exactly see the beauty in trying to turn Scheme into a configuration language with macros and hacks.


Scheme is a minimalistic Lisp dialect, and macros are central in Lisp. For example, they allow for both conditional evaluation ("if" is a macro, or more precisely, a "special form" that is used in other conditionals), and for delayed evaluation at run time, which matches a bit Nix being lazy.

Also, Scheme is designed as a not strictly but mostly functional language, favouring side-effect free functions, which matches well with the declarative task which is package definitions.

bash, in contrary, is not side-effect-free, it modifies its environment, and this is very much not desired in a functional package manager: it is at the core that package declarations are side-effect-free.

And Emacs shows that Lisp written in a declarative style is a superb configuration language. (There is now even a project to use a Scheme, Steel Scheme, to configure helix, a programmers text editor which has many many features stemming from vim!).

This entry was edited (1 day ago)
in reply to beleza pura

I think, because of Fedoras atomic desktops. I didn't use any of them yet, but it seems like Flatpaks should be used there, since one should (or can?) not install tradional packages there. Therefore Fedora provides the flatpaks anyway and they can be used on the non atomic desktops as well.

Another reason is, that you might not be able to install the latest version of an application as rpm package if a required dependency in the repo is outdated. A Flatpak usually does not have the issue since a newer version would include the fitting runtime.
This said, I do think its not this big of an issue for fedora which is usually quite up to date. But if you run a distribution with LTS releases or something like Debian you will much more likely have older dependencies in your repositiry.

This entry was edited (51 minutes ago)

yt-dlp command on debian to download highest available video and audio, provided that resolution is no higher than 1920 x 1080 p


debian 12.11, yt-dlp stable@2025.06.30.

I used this argument: "-f bv*[ext=mp4]+ba[ext=m4a]/b[ext=mp4]"

and it works: it downloads the best available video, audio and ffmpeg merges both in a single file. Automatically.

Except that the maximum resolution I need is 1920 x 1080 p. Best available video is oftentimes 4096 x 2160 p, too much for the target hardware.

Using -F to check different resolutions to then select one (like -f 299 or -f 148) is tiresome.

How do I do that? Ideally for whole playlists involving between 25 and 50 videos.

in reply to merompetehla

Taken from github.com/yt-dlp/yt-dlp. Replace 480 with 1080. Multiple options in the documentation to choose from.

Download the best video available with the largest height but no better than 480p, or the best video with the smallest resolution if there is no video under 480p


$ yt-dlp -S "height:480"

in reply to merompetehla

The following numeric meta fields can be used with comparisons <, <=, >, >=, = (equals), != (not equals):

filesize: The number of bytes, if known in advance
filesize_approx: An estimate for the number of bytes
width: Width of the video, if known
height: Height of the video, if known
aspect_ratio: Aspect ratio of the video, if known


So a height<=1080 should be it.

Palestinians Are Collapsing in Gaza's Streets From Israeli-Imposed Starvation Campaign


[can't believe that it keeps getting worse, but it does]

Abdel Qader Sabbah and Sharif Abdel Kouddous
Jul 21, 2025

Over the past five days alone, more than 550 Palestinians have been killed in Gaza, according to ministry of health figures. The confirmed death toll since the beginning of the war crossed 59,000 on Monday in what is widely acknowledged to be a vast undercount. Over the past two months, more than 1,000 Palestinians have been killed as they are forced to seek aid in militarized zones in a system mostly overseen by the Gaza Humanitarian Foundation (GHF), a shadowy U.S.- and Israeli-backed group.

One of the deadliest days for aid seekers came on Sunday, when over 70 people were killed, at least 67 of them in northern Gaza where Israeli troops opened fire on crowds trying to get food from a World Food Program convoy entering through the Zikim crossing.

“The tank came, surrounded us, and started shooting at us and we kept raising our hands,” Ibrahim Hamada, who was wounded in the leg, told Drop Site as he lay on a hospital gurney wincing in pain. “There were many martyrs, no one was able to retrieve them. I crawled on my stomach just to reach a car to take me to the hospital,” he said. “I went there to eat, because there was no food at home.”

Palestinians Are Collapsing in Gaza's Streets From Israeli-Imposed Starvation Campaign


cross-posted from: lemmy.ml/post/33477630

[can't believe that it keeps getting worse, but it does]

Abdel Qader Sabbah and Sharif Abdel Kouddous
Jul 21, 2025

Over the past five days alone, more than 550 Palestinians have been killed in Gaza, according to ministry of health figures. The confirmed death toll since the beginning of the war crossed 59,000 on Monday in what is widely acknowledged to be a vast undercount. Over the past two months, more than 1,000 Palestinians have been killed as they are forced to seek aid in militarized zones in a system mostly overseen by the Gaza Humanitarian Foundation (GHF), a shadowy U.S.- and Israeli-backed group.

One of the deadliest days for aid seekers came on Sunday, when over 70 people were killed, at least 67 of them in northern Gaza where Israeli troops opened fire on crowds trying to get food from a World Food Program convoy entering through the Zikim crossing.

“The tank came, surrounded us, and started shooting at us and we kept raising our hands,” Ibrahim Hamada, who was wounded in the leg, told Drop Site as he lay on a hospital gurney wincing in pain. “There were many martyrs, no one was able to retrieve them. I crawled on my stomach just to reach a car to take me to the hospital,” he said. “I went there to eat, because there was no food at home.”


Flotilla Ship Heads Towards Gaza With 7 U.S. Nationals


The Gaza Freedom flotilla coalition is sailing its next ship to break the illegal Israeli blockade of Gaza.

The Handala departed for Gaza on Sunday from the Italian port of Gallipoli after stops in Augusta and Siracusa in Sicily. The journey to Gaza may take around 7 days.

Twenty-one persons from 10 countries are onboard the Handala, including seven U.S. citizens, representing the hundreds of millions of Americans who are strongly opposed to the U.S. complicity in the Israeli genocide of Palestinians in Gaza.

The following nationalities are represented on the Handala: U.S. 7, France 4, Australia 2, Italy 2, Spain 2, Norway 1, Morocco 1, Tunisia 1, U.K. 1; Israel -2 U.S. citizens have dual citizenship with Israel.

in reply to eldavi

Any amount of civilian ships has zero chance of breaking through even a small Navy's determined effort to stop them. The purpose of these ships is to put Israel in a bind. Hurting foreign civilians that are on a peaceful mission would be bad politically. Letting them through would make Israel's blockade look like a joke and probably encourage others to do the same. Even stopping them without hurting anyone is showing the world that Israel doesn't want civilian aid going into Gaza. They likely know they will be intercepted and stopped by Israel's navy. The point is to make this an international incident that puts pressure on Israel to at least lessen it's genocidal tendencies. If all ships went at one time, it would be one news cycle. This way, they are making multiple news cycles out of it, maximizing the pressure.
This entry was edited (2 days ago)

UK, France and 23 other countries say the war in Gaza ‘must end now’


[now let's see if they do something]

By SYLVIA HUI and JILL LAWLESS
Updated 1:05 PM EDT, July 21, 2025

LONDON (AP) — Twenty-five countries including #Britain, #France and a host of #European nations issued a joint statement on Monday that puts more pressure on #Israel, saying the war in #Gaza “must end now” and Israel must comply with international law.

The foreign ministers of countries including #Australia, #Canada and #Japan said “the suffering of civilians in Gaza has reached new depths.” They condemned “the drip feeding of aid and the inhumane killing of civilians, including children, seeking to meet their most basic needs of water and food.”

The statement described as “horrifying” the deaths of over 800 #Palestinians who were seeking aid...

https://apnews.com/article/europe-israel-hamas-war-gaza-e4062cffa9585790061105236a93d8e5/

This entry was edited (2 days ago)

UK, France and 23 other countries say the war in Gaza ‘must end now’


cross-posted from: lemmy.ml/post/33476377

[now let's see if they do something]

By SYLVIA HUI and JILL LAWLESS
Updated 1:05 PM EDT, July 21, 2025

LONDON (AP) — Twenty-five countries including #Britain, #France and a host of #European nations issued a joint statement on Monday that puts more pressure on #Israel, saying the war in #Gaza “must end now” and Israel must comply with international law.

The foreign ministers of countries including #Australia, #Canada and #Japan said “the suffering of civilians in Gaza has reached new depths.” They condemned “the drip feeding of aid and the inhumane killing of civilians, including children, seeking to meet their most basic needs of water and food.”

The statement described as “horrifying” the deaths of over 800 #Palestinians who were seeking aid...


https://apnews.com/article/europe-israel-hamas-war-gaza-e4062cffa9585790061105236a93d8e5/

VS Achuthanandan, politician who pushed for Linux adoption in India, passed away today


India has one of the highest rates of (desktop) Linux usages in the world - hovering around 10% according to StatCounter. Why is this? One reason is concerns over software controlled by foreign countries - particularly the US and China. But another is cost.

The first major boost for Linux and other free software in India came in 2006, when VS Achuthanandan - who passed away today - was elected Chief Minister of the state of Kerala. His government came up with a policy to shift all government computers to free software, starting with schools and colleges.

When the financial benefits became apparent, other states and the Union government followed suit.