Re: How to replace words in all files?

From: Fafa Hafiz Krantz (fteg_at_london.com)
Date: 05/13/05

  • Next message: Sergey S. Ropchan: "Re: How to replace words in all files?"
    To: "Sergey S. Ropchan" <fenix@ramb.com.ua>, questions@freebsd.org
    Date: Fri, 13 May 2005 05:23:49 -0500
    
    

    > find / -name '*' -print | xargs grep "lnc0"
    > - gives you all files in your system with lnc0 ...
    >
    > perl -pi.bak -pe 's/lnc0/rl0/' file1 file2 ... fileN
    > - will replace lnc0 - rl0 in all specified files, with backuping of old
    > files in *.bak

    Thank you!

    *nods in burning respect*

    --
    Fafa Hafiz Krantz
      Research Designer @ http://www.home.no/barbershop
      Enlightened @ http://www.home.no/barbershop/smart/sharon.pdf
    -- 
    ___________________________________________________________
    Sign-up for Ads Free at Mail.com
    http://promo.mail.com/adsfreejump.htm
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
    

  • Next message: Sergey S. Ropchan: "Re: How to replace words in all files?"

    Relevant Pages