(patch for Bash) Python command substitution in Bash

those who know me have no need of my name not-a-real-address at usa.net
Fri Feb 14 21:44:12 EST 2003


in comp.unix.shell i read:

>Here is my patch to "command substitution" syntax of Bash to interface
>with Python automatically.  Not quite "embedding", but close enough for
>short one-liners.
>
>If command string begins with '!', then the rest of string is sent to
>Python as command-line argument with double quotes, ie.
>    python -c "string"

i dislike this appropriation of the special character, especially for so
trivial an invocation.  at the least the character and the program invoked
should be configured, rather than hard-coded.

-- 
bringing you boring signatures for 17 years




More information about the Python-list mailing list