atzanteol

joined 2 years ago
[–] atzanteol@sh.itjust.works 2 points 11 hours ago

when someone dies due to the deliberate actions taken by another to kill them, that's a murder.

"Murder is the unlawful killing of a human being with malice aforethought."

[–] atzanteol@sh.itjust.works 14 points 11 hours ago (1 children)

"Without evidence" is this administration's tag line.

[–] atzanteol@sh.itjust.works 6 points 11 hours ago

Let's encourage human interaction rather than sending people away to an llm.

[–] atzanteol@sh.itjust.works 3 points 11 hours ago* (last edited 11 hours ago)

I'm totally in favor of people asking other people for help with these things. But here's what Claude gave.

Found the Issue!

The problem is a mismatch between your find output and what read expects:

  • find with a regular pipe outputs newline-separated filenames
  • read -r -d '' expects null-terminated input (the -d '' means "use null byte as delimiter")

Solution 1: Use -print0 with find (Recommended)

Change your find command to use -print0:

find ./ -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | while IFS= read -r -d '' file; do

Solution 2: Remove -d '' from read

find ./ -type f \( -iname "*.jpg" -o -iname "*.png" \) | while IFS= read -r file; do

Additional Issues to Fix:

  1. Quote your wildcards: -iname \*.jpg should be -iname "*.jpg" to prevent shell expansion
  2. File extension preservation: Your script generates UUIDs but loses the file extension (.jpg, .png). You probably want to keep those!

Improved Script:

#! /bin/bash
echo "This script will rename all files in this directory with unique names. Continue? (Y/N)"
read proceed
if [[ "$proceed" == "Y" ]]; then
    echo "Proceed"
    
    find ./ -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | while IFS= read -r -d '' file; do
        echo "in loop"
        echo "$file"
        
        # Extract the directory and extension
        dir=$(dirname "$file")
        ext="${file##*.}"  # Get file extension
        
        # Generate new name with UUID but keep extension
        new_name="$dir/$(uuidgen -r).$ext"
        
        echo "Renaming ${file} to ${new_name}"
        # mv "$file" "$new_name"  # Uncomment to actually perform the rename
    done
    echo "After loop"
else
    echo "Cancelling"
fi

The key changes:

  • Added -print0 to find
  • Quoted the wildcard patterns
  • Preserved file extensions using ${file##*.}

Try this and let me know if it works!

[–] atzanteol@sh.itjust.works 7 points 17 hours ago

Printers are the only piece of hardware I own that I am legitimately surprised by when they work.

[–] atzanteol@sh.itjust.works 3 points 17 hours ago

"Calvinball jurisprudence"

[–] atzanteol@sh.itjust.works -1 points 23 hours ago

guess what, I know how these work.

Neat. I don't care.

[–] atzanteol@sh.itjust.works -1 points 1 day ago (2 children)

so please tell me “how to do things right”, or shut up if you can’t tell any useful info

WTF? I'm not trying to tell you how to do anything. I'm sick of selfhosted twerps bitching about "how hard it is to self host" when they think everything should be like an app on their phone. You need to learn how networks, dhcp, dns, ssl, certificates, etc. work.

[–] atzanteol@sh.itjust.works 0 points 2 days ago (4 children)

They're cheap. You can also generate your own certs and use your own ca. But otherwise yes - quit yer bitching and learn how to do things right.

[–] atzanteol@sh.itjust.works 7 points 2 days ago

That is some premium copium.

[–] atzanteol@sh.itjust.works 0 points 2 days ago* (last edited 2 days ago) (6 children)

You don't need to if you're just using things locally.

But also - domains are cheap.

 

Two days after catastrophic floods roared through Central Texas, the Federal Emergency Management Agency did not answer nearly two-thirds of calls to its disaster assistance line, according to documents reviewed by The New York Times.

The lack of responsiveness happened because the agency had fired hundreds of contractors at call centers, according to a person briefed on the matter who spoke on the condition of anonymity in order to discuss internal matters.

 

Health secretary Robert F. Kennedy Jr.’s advisers ordered the release of a dataset that includes the private health information of people living in California, Illinois, Washington state, and Washington, D.C., to the Department of Homeland Security

 

Our longstanding offering won’t fundamentally change next year, but we are going to introduce a new offering that’s a big shift from anything we’ve done before - short-lived certificates. Specifically, certificates with a lifetime of six days. This is a big upgrade for the security of the TLS ecosystem because it minimizes exposure time during a key compromise event.

 

If you're self hosting roundcube be sure to update.

view more: next ›