This is the mail archive of the cygwin-talk mailing list for the cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Quoting characters


Op Thu, 22 Dec 2005 14:47:23 -0500 schreef Christopher Faylor
in <20051222194723.GC23238<at>trixie.casa.cgf.cx>:
:  On Thu, Dec 22, 2005 at 10:46:19AM -0800, Yitzchak Scott-Thoennes wrote:
: > It's the combination of quoting characters + newlines + no whitespace
: > separation that made it seem especially unreadable to me.  I would
: > have written:

[Two ways of writing my report]

Both more readable, admittedly.

: > The latter would still be readable to me with ``'', but I prefer ".

:  What he said.

:  I'm glad it wasn't just me.


I'll try to do better, and write things like: <<


  I have this shell-script:

  === begin hippo.sh ===
  #!/bin/bash

  for prop in mean enormous ugly moody heavy strong hungry fat dangerous; do
    for modf in A "That other" Every; do
      echo "${modf} hippo is ${prop}${oprop}"
    done
    echo "All hippos are ${prop}${oprop}."
    oprop=" and ${prop}${oprop}"
  done

  ==== end hippo.sh ====

  When I type: ``

    ./hippo.sh

  '', it produces this output: ``

    A hippo is mean
    That other hippo is mean
    Every hippo is mean
    All hippos are mean.
    A hippo is enormous and mean
    That other hippo is enormous and mean
    Every hippo is enormous and mean
    All hippos are enormous and mean.
    A hippo is ugly and enormous and mean
    That other hippo is ugly and enormous and mean
    Every hippo is ugly and enormous and mean
    All hippos are ugly and enormous and mean.
    A hippo is moody and ugly and enormous and mean
    That other hippo is moody and ugly and enormous and mean
    Every hippo is moody and ugly and enormous and mean
    All hippos are moody and ugly and enormous and mean.
    A hippo is heavy and moody and ugly and enormous and mean
    That other hippo is heavy and moody and ugly and enormous and mean
    Every hippo is heavy and moody and ugly and enormous and mean
    All hippos are heavy and moody and ugly and enormous and mean.
    A hippo is strong and heavy and moody and ugly and enormous and mean
    That other hippo is strong and heavy and moody and ugly and enormous and mean
    Every hippo is strong and heavy and moody and ugly and enormous and mean
    All hippos are strong and heavy and moody and ugly and enormous and mean.
    A hippo is hungry and strong and heavy and moody and ugly and enormous and mean
    That other hippo is hungry and strong and heavy and moody and ugly and enormous and mean
    Every hippo is hungry and strong and heavy and moody and ugly and enormous and mean
    All hippos are hungry and strong and heavy and moody and ugly and enormous and mean.
    A hippo is fat and hungry and strong and heavy and moody and ugly and enormous and mean
    That other hippo is fat and hungry and strong and heavy and moody and ugly and enormous and mean
    Every hippo is fat and hungry and strong and heavy and moody and ugly and enormous and mean
    All hippos are fat and hungry and strong and heavy and moody and ugly and enormous and mean.
    A hippo is dangerous and fat and hungry and strong and heavy and moody and ugly and enormous and mean
    That other hippo is dangerous and fat and hungry and strong and heavy and moody and ugly and enormous and mean
    Every hippo is dangerous and fat and hungry and strong and heavy and moody and ugly and enormous and mean
    All hippos are dangerous and fat and hungry and strong and heavy and moody and ugly and enormous and mean.

  '', which is as expected.


>>, when I want to avoid some confusion, and white-space is not
too critical.


L8r,

Buzz.
-- 
  ) |  | ---/ ---/  Yes, this | This message consists of true | I do not
--  |  |   /    /   really is |   and false bits entirely.    | mail for
  ) |  |  /    /    a 72 by 4 +-------------------------------+ any1 but
--  \--| /--- /---  .sigfile. |   |perl -pe "s.u(z)\1.as."    | me. 4^re


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]