• 0 Posts
  • 25 Comments
Joined 5 months ago
cake
Cake day: July 12th, 2024

help-circle
  • I still (have to) download scetchy executables on Windows when I want to install most programms, while on debian I can install most programs via apt and a few repositories. Even when it’s not a standard repo I still prefer it over random executables because while the security is just as bad at least I get updates without having to open the program itself.

    But what resonated with me most have been the restarts for updates. Happened way to often that I wanted to stop working but cant just shut down windows without updates and the accompanying reboots. (If I don’t check up in between to decrypt the disk on startups it’ll just sit there and run out the battery and I have to do the restarts on the next workday). On debian I just klick the power button, it hibernates (or I shut it down if I’m in the mood) and os updates are completely seperate from that.




















  • can anyone help me figure out, why the following shell script does not work:

    #!/bin/bash
    while IFS= read -d $'\0' -r "dir" ; do 
          dir=${dir:2};
          echo "${dir}"\#;
          cd "'""${dir}""'" ;
          ls;
          ##doing something else
         # cd  ..;
    done < <(find ./  -mindepth 1 -maxdepth 1 -type d -print0)
    

    I am running it in a location with a lots of folders containing spaces (think of it like this:

    /location containing spaces# ls
    'foo ba' 'baa foo ' 'tee pot'
    

    I get errors of the following form:

    script.sh: line 5: cd: 'baa foo ': No such file or directory

    but when I manually enter cd 'baa foo' it works fine. Why could that be? (the echo retuns something like “foo baa #” .) It really confuses me that the cd with the exact same string works when I enter it manually. I have allready tried leaving out the quotes in the cd command and escaping the spaces using dir=$(printf %q "${dir}"); before the cd but that did not work either.

    tbh I am new to shell scripts so maybe there is something obvious I overlooked.