logoalt Hacker News

akdev1ltoday at 1:24 PM1 replyview on HN

    from subprocess import run
    from sys import argv

    source = argv[1]
    destination = argv[2]

    run([
      "rsync",
      "-zavp",
      source,
      destination
    ])
vs

    #!/usr/bin/env bash

    source="$1"
    destination="$2"

    rsync \
      -zavp \
      "$source" \
      "$destination"
the overhead is not really that bad imo

Replies

godelskitoday at 3:47 PM

That's not really what people mean. Your example isn't accurate because you just ran bash two different ways.

show 2 replies