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: 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: References: Date: Sat, 31 May 2014 07:47:40 +1000 Subject: Re: Multi-line commands with 'python -c' From: Chris Angelico Cc: "comp.lang.python" 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Sat, May 31, 2014 at 7:42 AM, Devin Jeanpierre 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