Skip to content
Advertisement

Embedding bash commands

I’m using virtualenvwrapper and trying to create a virtualenv using a version of python that’s not the default.

What I’d like to do is:

JavaScript

…But without the copy-paste. Is there a way to do this in one line?

Advertisement

Answer

JavaScript

is the correct way to write this as a one-liner. type is a POSIX standard utility, so it is more likely to exist and work consistently across POSIX-ish systems than which.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement