Multi-line commands with 'python -c'

Chris Angelico rosuav at gmail.com
Fri May 30 17:47:40 EDT 2014


On Sat, May 31, 2014 at 7:42 AM, Devin Jeanpierre
<jeanpierreda at gmail.com> wrote:
> In unix shells you can literally use a new line. Or is that only bash?

You can in bash, I know, but it's fiddly to type it; and more
importantly, it's not a good point in the "this is cleaner than a
series of pipes" argument. My primary recommendation, of course, was a
three-line script saved as an actual file, but for a more direct
parallel to the pipe-it-three-ways model, I wanted to use -c.

ChrisA



More information about the Python-list mailing list