An SCP I've been using for a long time to upload files has suddenly stopped working. I ran the script 12 hours ago and it worked just fine, but has suddenly stopped.
The command in question was uploading the current directory to a remote folder:
#!/bin/bash cd "$(dirname "$0")" scp -r . <remote_server>:<remote_folder>
The error message is:
scp: error: unexpected filename: .
I'm on a Mac running Mojave 10.14.2.
UPDATE: I have solved the specific problem by rewriting the command to this, but I'd still be interested to know what broke:
scp -r $(pwd) <remote_server>:<remote_folder>