Comment by kragen

5 days ago

The Bourne shell is definitely less work unless you want your code to correctly or reliably handle user input. Then it's more work.

Not in my experience. Any concrete examples off the top of your head, where it's more work than setting up pipes in python manually?

  • Fill in the blank to run a docker container which opens the file with user-provided path in (say) vim.

    docker run --rm -it ...?

    Now run a container doing the exact same thing ("docker-in-docker").

    docker run --rm -it -v $DOCKER_HOST:/var/run/docker.sock ...?

    • > Fill in the blank to run a docker container which opens the file with user-provided path in (say) vim.

      Never used docker before, but this seems to work:

          docker run --rm -it debian bash -c 'vim -- "$1"' _ "$user_provided_path"

      3 replies →