Föderation EN Fr 11.04.2025 22:01:06 Interesting #ShellScripting quandary: I'm uncertain how shells delimit filename variables internally. I have a shell (bash) function that loops through a set of PDF files, opening them in zathura in a "suckless" tabbed window (so that the PDFs always open within the same window, so I can just hit Here is my variable declaration:
But for simplicity, you could just imagine it to be:
Then I'm doing a
I'm wanting to print a status line for each item viewed, so I have an idea how many more there are to go, so I'm using this:
And of course, there's a But how to get the total (
What I ended up doing was just creating a
One-liner loop before the actual loop, just to get a total. Is there a better way? Am I missing something really obvious? |
Föderation · Fr 11.04.2025 22:06:33 use arrays. $ files = ("file1" "file2" "file3") |
Föderation EN Fr 11.04.2025 22:10:01 Wouldn't that require a Or is there an easy way to do something like
(that would actually read it into an array, rather than schlorping it all into |
Föderation · Fr 11.04.2025 22:55:32
|