this post was submitted on 12 Dec 2023
636 points (95.2% liked)

Memes

45894 readers
715 users here now

Rules:

  1. Be civil and nice.
  2. Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.

founded 5 years ago
MODERATORS
 
  • ISO 8601 is paywalled
  • RFC allows a space instead of a T (e.g. 2020-12-09 16:09:...) which is nicer to read.
you are viewing a single comment's thread
view the rest of the comments
[โ€“] calcopiritus 1 points 1 year ago (1 children)

Both arguments are surrounded by ", which should be space-safe.

At least in the shells I use, putting " makes spaces inside paths a non-issue.

[โ€“] rtxn 1 points 1 year ago

For the rsync command, yes. But this:

for d in $(find . -type d); do
    echo "$d"
done

will process the space-separated parts of each path as separate items. I had to work around this issue just two days ago, it's an obscure thing that not everyone will keep in mind.