Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #72322

Re: Multi-line commands with 'python -c'

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.011
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; '"this': 0.03; 'model,': 0.05; 'cc:addr:python-list': 0.11; 'argument.': 0.16; 'bash,': 0.16; 'cleaner': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'it;': 0.16; 'subject:python': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'file,': 0.19; 'cc:addr:python.org': 0.22; '31,': 0.24; 'cc:2**0': 0.24; 'script': 0.25; 'primary': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'am,': 0.29; 'unix': 0.29; 'message-id:@mail.gmail.com': 0.30; 'actual': 0.34; 'subject:with': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'new': 0.61; 'more': 0.64; 'series': 0.66; 'direct': 0.67; 'importantly,': 0.68; 'subject:commands': 0.84; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=6lr5YiOTCCHr78eeqQIGEnEuTDzTrmiRvifDF2JmN9s=; b=U6YNnWOYETvZ4ochikFy8CPBrBQmPIlfPiXsU27PqMV6KcDIQ/seb5XD4D9YrL79qN 3hLtKzMXexyeb7JA7DITIxED+Rc//2vvjgxExdJ1rSbTetkPYuay4H9YGEY5saHYNs/E OazZm69lXzOPrEcweufI87NDOqLAh1QjPfLQWDmGGwI46K4PnA9cDV9yocjLGToAcqfn FEC48p2LuARQ429Y4+HO/IRQDRx37BXUUio9CcK93G/dudvBKkjG/gpML6EqOs55SOvG jNM0TT0S04mMEmsQtnw7Cu6zgAQP0COPTBphlrKH1SArHE7odrfc+A0lyPGruSgGPrRd IXPA==
MIME-Version 1.0
X-Received by 10.58.74.38 with SMTP id q6mr16184312vev.7.1401486460780; Fri, 30 May 2014 14:47:40 -0700 (PDT)
In-Reply-To <CABicbJKjGCoEuZpAXfr_YUzFD=BYq_ezjkSf57k4vRjnb3MhvA@mail.gmail.com>
References <mailman.10468.1401411146.18130.python-list@python.org> <XnsA33DE1B7E35C5duncanbooth@127.0.0.1> <CABicbJKjGCoEuZpAXfr_YUzFD=BYq_ezjkSf57k4vRjnb3MhvA@mail.gmail.com>
Date Sat, 31 May 2014 07:47:40 +1000
Subject Re: Multi-line commands with 'python -c'
From Chris Angelico <rosuav@gmail.com>
Cc "comp.lang.python" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.10500.1401486463.18130.python-list@python.org> (permalink)
Lines 11
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1401486463 news.xs4all.nl 2953 [2001:888:2000:d::a6]:39338
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:72322

Show key headers only | View raw


On Sat, May 31, 2014 at 7:42 AM, Devin Jeanpierre
<jeanpierreda@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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Multi-line commands with 'python -c' Chris Angelico <rosuav@gmail.com> - 2014-05-30 10:52 +1000
  Re: Multi-line commands with 'python -c' Rustom Mody <rustompmody@gmail.com> - 2014-05-29 23:04 -0700
    Re: Multi-line commands with 'python -c' Rustom Mody <rustompmody@gmail.com> - 2014-05-29 23:45 -0700
      Re: Multi-line commands with 'python -c' Rustom Mody <rustompmody@gmail.com> - 2014-05-29 23:54 -0700
        Re: Multi-line commands with 'python -c' Peter Otten <__peter__@web.de> - 2014-05-30 09:33 +0200
      Re: Multi-line commands with 'python -c' Terry Reedy <tjreedy@udel.edu> - 2014-05-30 11:29 -0400
    Re: Multi-line commands with 'python -c' Chris Angelico <rosuav@gmail.com> - 2014-05-30 17:20 +1000
      Re: Multi-line commands with 'python -c' Rustom Mody <rustompmody@gmail.com> - 2014-05-30 05:47 -0700
        Re: Multi-line commands with 'python -c' Chris Angelico <rosuav@gmail.com> - 2014-05-30 22:58 +1000
  Re: Multi-line commands with 'python -c' Duncan Booth <duncan.booth@invalid.invalid> - 2014-05-30 21:11 +0000
    Re: Multi-line commands with 'python -c' Devin Jeanpierre <jeanpierreda@gmail.com> - 2014-05-30 14:42 -0700
    Re: Multi-line commands with 'python -c' Chris Angelico <rosuav@gmail.com> - 2014-05-31 07:47 +1000
      Re: Multi-line commands with 'python -c' Duncan Booth <duncan.booth@invalid.invalid> - 2014-05-31 16:41 +0000
        Re: Multi-line commands with 'python -c' Peter Otten <__peter__@web.de> - 2014-05-31 19:11 +0200
          Re: Multi-line commands with 'python -c' Duncan Booth <duncan.booth@invalid.invalid> - 2014-06-01 20:43 +0000

csiph-web