Elektrine lite

← Feed

@kagan@wandering.shop

Post #762912

2026-03-23 14:17 UTC

[Edit: Solved!] I [had] a bizarre-ass #Bash #scripting problem. I'm at my wits' end. I have a script that scans a directory and picks a random file from it. This script works just fine if I invoke it manually, from the command line in a terminal window. But if I run it from the Linux Mint/Cinnamon menu (start menu, whatever), it hangs when it tries to list the files in the dir. Likewise when run from crontab (which is how I really want to run it most of the time). 🧵 1/4 #LinuxHelp #BashScript

Replies (1)

  • @kagan@wandering.shop 2026-03-23 14:17

    I've set it up to do some logging. Among other things, I've had it check with the -d and -r flags that yes, the target directory exists, and is readable by the script. (It's writable for it, as well; I've even had the script touch a zero-byte file in there. That works fine, both from the menu and via cron.) 2/4

    Open ##1427887