Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2007
    Posts
    7

    Red face Unanswered: printing the single quote

    Hi i have this sed command to find the word old and replace with 'new' (with single quote in between)
    My problem is the single quote dont recognize below is my script.

    sed 's/old/'new'/' file.txt > newword
    mv newword file.txt

  2. #2
    Join Date
    Sep 2007
    Posts
    7
    sigh...
    i finally made it work after trying and just adding the '\ here's how...

    sed 's/old/'\'new\''/' file.txt > neword
    mv newword file.txt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •