Get the latest tech news

Idiomatic Awk


Following up from here, a concrete application of the technique sketched at the end of that article. Considering that it's a quick and dirty hack, and that the configuration format was conjured up from scrath in 10 minutes, it has worked surprisingly well so far (for what it has to do).

The approaches so far (except the first one, which however has other drawbacks) have the problem that they are not incremental, so if a transfer is interrupted, we have to restart it from the beginning (ok, we can cheat and move or delete the already-copied data on the origin, so it doesn't have to be copied again, but it should be obvious that this is neither an optimal nor a desirable workaround). A slightly better method could be to cleanup the relevant entry from remote1's~/.ssh/known_hosts file just before starting the transfer (eg with sed or some other tool), and then use StrictHostKeyChecking=no to have the key automatically added without confirmation, for example: However, it leaves behind a file with the .old suffix, and outputs a message which can't be suppressed with-q, despite what the man page says, so one would need to resort to shell redirection if silent operation is wanted.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Idiomatic Awk

Idiomatic Awk