

For trailing whitespace agreed, but a whitespace in the middle of the file is not uncommon and should be properly handled.
Programming and reading.


For trailing whitespace agreed, but a whitespace in the middle of the file is not uncommon and should be properly handled.


If the filename has a space, a good solution without adjusting the files is to use quotes: "$FILENAME-synced.mkv"
Edit: generally, as a good practice, quote all variables. If you had FILENAME="my file"and tried to use it asffprobe $FILENAMEit wouldn't work, because variables are evaluated *before* interpreting the command, so effectively it evaluates toffprobe my file(two arguments).ffprobe "$FILENAME"on the other hand evaluates toffprobe “my file”` (onr argument) and works properly no matter the file name.


A script is just a list of commands. You can likely already execute your file as bash <filename> and get the same result. To use arguments, simply refer to them by number ($1 is the first argument, etc.).
Bonus: you can use a shebang to make it feel like an executable. Put /bin/bash as the first line, then make it executable via chmod +x <filename>, and now yoi can run it like ./<filename>


Why are you not simply writing a script with an argument? Why this cat indirection with environment variables?
Is this supposed to be a joke? Because this is the standard datetime format in large parts of the world
P2P is a thing, it’s just not practical for large platforms. But you’ll find lots of peer-to-peer in small-scale applications.
Not everyone can run their own instance. Aside from this being tedious if every service did that (you don’t just register an account, gotta figure out how to run it locally), you also run into networking and hardware limitations. To run an instance you need a publicly accessible device that supports that service. Someone just using their phone would have no way of accessing the service. Someone on the road would have no access (unless they also set up a home VPN to connect to their private instance). It’s just not practical.


Using zsh will gelp with that mistake, because by default it will turn the ‘no matches’ scenario into an error. But seriously, always quote your arguments if there is any chance for ambiguity (also for variables)


I typically have one DB service per app service (not just ler cluster, unless multiple services need the same db).
Advantages:
Disadvantages:
Thanks! Typed this on mobile, must have missed the key