Skip Navigation

InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)Q
Posts
2
Comments
297
Joined
2 yr. ago

  • I don't like that I get zero feedback when typing in my boot-time decryption password. Like, I can't even tell if my keyboard is working. Did I press Enter or am I wasting my time staring at the prompt: "enter password for drive whatever (random guid)".

    I've literally sat there with my keyboard not even plugged in, not realizing it wasn't dong anything because there's no feedback. Like, can't it show some asterisks? Or maybe "attempting decryption" after I press Enter, or anything? The only feedback is: it will either boot or say "invalid password" eventually.

    It's a minor frustration, but it's every day that it bugs me.

    (OpenSUSE Tumbleweed. LUKS2 or whatever, using the built-in encryption when I first installed it on my laptop.)

  • This has never happend before. For example when I migrated from Windows to Linux I had no issues copying my profile. It's still active in Windows which I occassionally boot. Same with copying my profile to my Steam Deck.

    That makes me wonder... I should go boot my SteamDeck to desktop mode and see if my profile there still has active logins. Windows, too.

  • Yeah, I figured. I don't know why that other guy was being so weird about it.

  • And frankly, it doesn't particularly matter what OP meant

    This entire argument was me just trying to explain what OP meant. So yes, it matters.

    You're an ass. Blocked.

  • That's a sea turtle in your photo and not a tortoise.

    Anyway, rather they continue to argue with me, why don't you just ask OP what they meant?

    Here, I'll do it for you... @stringere@sh.itjust.works What did you mean by your title? Can you settle our debate?

  • I'm not talking about the color variant (which doesn't look like a toirtoise at all, really). OP's cat's belly looks like a literal tortoise shell.

  • OP didn't say "tortie". They said tortoise shell pattern. (Well, they implied that.) The pattern of dots on the cat's belly does indeed look kind of like a tortoise shell.

  • The image's content is plain wrong. Waxing poetic about JPEG artifacts doesn't make this image any more interesting or funny. It's just dumb.

  • Deleted

    Permanently Deleted

    Jump
  • Prongles

  • GNOME is Not an Overly Mediocre Experience.

  • What does GNOME stand for? Wrong answers only.

  • Removed

    Tiny ramen shop

    Jump
  • God, I wish Cup noodles tasted as good as real ramen.

  • Literally none. It has never caused confusion or accidental pastes of private information into web browsers.

  • What do you all think about zram?

  • Wait, is "dark pattern" taboo now?

  • Aww! What's her name?

  • for loops

    Your code executes ls and records the results in a variable. The result is some text, a string of characters. (We call them "strings" and i is now a string variable.) Among the characters in a string variable might be spaces, tabs, or new line characters. I mention this because the special variable IFS is used by for loops, and it contains exactly one space, tab, and new line by default.

    When you call for with a string as the input, it splits the string into units by splitting on each character in IFS. That is, it splits the big string into individual parts by splitting at each space, tab and new line. So this creates an array which is what is looped over. Each word in turn is assigned to your looping variable and then the code after the do is executed once per word.

    ("word" has a sort of a special meaning here. When I say word, I mostly just mean a string that has no spaces in it. When you read text in English, there are words. They're strings of characters separated by spaces. But words can also be separated by tabs, commas, semicolons, or whatever, but not by default when using for! You have to modify IFS to add those characters if you want them to be considered word separators.)

    So, if any of the file system entries returned by ls have spaces in them, your loop is going to create more outputs than there are file system entries in the current directory.

    For example:

     
        
    file one.txt
    file two.txt
    my photo.jpg
    notes (final).md
    a b c d.txt
    
      

    That would cause like 12 loops and 12 outputs in your code despite there only being five files.

    If you instead overwrite IFS before running your loop, and only assign a single new line to the variable, then your loop will only be over the actual lines of the input text. Like this:

    IFS=$'\n'

    and then use your exact code above. Using my example of five files, this code will now only produce 5 outputs, not 12.

    You can assign whatever characters you want to IFS.

    (I have not tested any of this code, or examples.)

    Variable names

    The loop variable name i is just an identifier. Any valid variable name would work except you can't use the reserved names like $1, $2 or any keywords as names. Also, there's no way to escape an identifier. They are just literal names.

    You also don't want to use any built-in variable names or else you'll overwrite their values for the duration of the current session. Bash will happily let you use them as your looping variable, but the rest of your code might have undesirable results. Variable names like IFS, for instance. :D

  • Come on, in the fourth frame the hard drive should be on its side, facing the camera. Not on it's back.