Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Sed command to change log.info to print

  • 02-09-2020 10:47AM
    #1
    Registered Users, Registered Users 2 Posts: 5,769 ✭✭✭


    So i've loads of code in my repo with the log.info log.debug etc etc. I want to run a sed command to change them to print commands so theyll show in console for pycharm while im troubleshooting. Something like
    sed -i  's/log.*(/print(/g'  filename
    

    How to do this. And for an extra brownie point, how to undo it


Comments

Advertisement