Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

sed the escape character

  • 04-03-2011 01:48PM
    #1
    Closed Accounts Posts: 18


    I don't know whether this is easy or impossible!!

    #sed "s|%5C|\|g" $DB_NAME"data01.sql" >$DB_NAME"data02.sql"

    I am trying to convert the %5C to \ but this seems like a good way to kill ubuntu!!!:D

    How do I escape \?


Comments

  • Moderators, Arts Moderators Posts: 36,236 Mod ✭✭✭✭pickarooney


    Does using \e or \x1B instead of %5C help?


  • Registered Users, Registered Users 2 Posts: 1,889 ✭✭✭evercloserunion


    TonyMac wrote: »
    I don't know whether this is easy or impossible!!

    #sed "s|%5C|\|g" $DB_NAME"data01.sql" >$DB_NAME"data02.sql"

    I am trying to convert the %5C to \ but this seems like a good way to kill ubuntu!!!:D

    How do I escape \?
    You should just be able to use \\.


Advertisement