1

I have a bash function that writes to a markdown file. Here it is in its simplest form:

function n() {
   echo $@ >> path/file.md;
}

This works fine. However, when I change the path to an iCloud destination, nothing happens. No error is returned, but the markdown file is unchanged.

Terminal, though, has access to read the iCloud-based file. tail path/file.md indeed returns the last lines of the file.

Also, for clarification, the problem is not that iCloud isn't syncing cross devices. Even the local version of the file is unchanged.

5
  • What paths are you using specifically? I can write to all folders (in Terminal) that sync with iCloud and OneDrive.
    – Allan
    Aug 31, 2020 at 18:39
  • @Allan the file is /Users/username/Library/Mobile Documents/com~apple~CloudDocs/Obsidian/record.md
    – Unrelated
    Aug 31, 2020 at 18:42
  • I've no quotes around it because those have returned errors for me
    – Unrelated
    Aug 31, 2020 at 18:46
  • 1
    Please run the echo to the target file directly on the command line and then copy/paste both the command and any Output you get into the question. Also run ls -l on the file and add the result
    – nohillside
    Aug 31, 2020 at 18:49
  • 1
    Yes. Please follow @nohillside 's instructions. Also, you want to edit the original question with the new information, please don't post it as a comment.
    – Allan
    Aug 31, 2020 at 18:56

0

You must log in to answer this question.

Browse other questions tagged .