Loading ...
Sorry, an error occurred while loading the content.

Re: Newline and Variables from Command-Line

Expand Messages
  • steve@rubysolutions.com
    Thanks, that script needs to run under linux and NT your quotes worked find under bash and tsch on linux on NT I had only to reverse the quotes and do
    Message 1 of 4 , Jan 4, 2001
    • 0 Attachment
      Thanks, that script needs to run under linux and NT your quotes worked
      find under bash and tsch on linux on NT I had only to reverse the
      quotes and do
      "'('.$1.')'"

      I whish there was an easier way... I was hoping to not have to parse
      the command line for \n because then I would have to do the same for
      other escape sequesnces.

      How come I can put \n in the pattern and it works but not the
      replacement?


      --- In perl-beginner@egroups.com, Sean Quinlan <seanq@d...> wrote:
      > Oops, sent with a critical typo. Please note '"(".$1")\n"' below
      should be
      > '"(".$1.")\n"'
      >
      > >Would, for your example, turn -2305 into -2305. However, this may
      cause
      > >other problems for you. For instance it would break the newline
      problem
      > >above. And you may have noticed, dropped the parens from the
      output.
      > >However, this can be gotten around if your replacement is entered
      as a
      > >string to be interpolated, such as entering (only tested under tcsh
      on a
      > >sun) '"\n"', which would work with ee; allowing something like
      > >'"(".$1")\n"' to work printing (from above)
      > >(-2305)
      > >(with newline).
      > >
      >
      >
      > Sean P. Quinlan
      > mailto:sean@q...
      > 508-533-0582
    Your message has been successfully submitted and would be delivered to recipients shortly.