tr/// question

Discussion in 'Perl Misc' started by Sunil, Aug 7, 2003.

  1. Sunil

    Sunil Guest

    All,
    Is it possible to use tr to change all occurrences of ' (single
    quote) into '' (two single quotes).

    I need to change all occurrences of ' in a file to ''


    Thanks,
    Sunil.
    Sunil, Aug 7, 2003
    #1
    1. Advertising

  2. Sunil

    Xaonon Guest

    Ned i bach <aQmYa.1$>, Sunil
    <> teithant i thiw hin:

    > All,
    > Is it possible to use tr to change all occurrences of ' (single
    > quote) into '' (two single quotes).
    >
    > I need to change all occurrences of ' in a file to ''


    Not really. tr/// is used to turning single characters into other single
    characters. Try s/'/''/g.

    --
    Xaonon, EAC Chief of Mad Scientists and informal BAAWA, aa #1821, Kibo #: 1
    Visit The Nexus Of All Coolness (i.e. my site) at http://xaonon.dyndns.org/
    "Xaonon is a sofa that sorts your mail, is built and maintained by tiny
    nano-robots and induces lucid dreaming." -- thesurrealist.co.uk/priorart.cgi
    Xaonon, Aug 7, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sean
    Replies:
    1
    Views:
    591
    Cowboy \(Gregory A. Beamer\)
    Oct 20, 2003
  2. =?Utf-8?B?UnlhbiBTbWl0aA==?=

    Quick Question - Newby Question

    =?Utf-8?B?UnlhbiBTbWl0aA==?=, Feb 14, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    646
    Iain Norman
    Feb 16, 2005
  3. =?Utf-8?B?YW5kcmV3MDA3?=

    question row filter (more of sql query question)

    =?Utf-8?B?YW5kcmV3MDA3?=, Oct 5, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    941
    Scott Allen
    Oct 6, 2005
  4. Philip Meyer
    Replies:
    0
    Views:
    417
    Philip Meyer
    Nov 30, 2003
  5. Bit Byte
    Replies:
    1
    Views:
    836
    Teemu Keiski
    Jan 28, 2007
Loading...

Share This Page