Created
          December 13, 2011 17:29 
        
      - 
      
 - 
        
Save JoshuaEstes/1473035 to your computer and use it in GitHub Desktop.  
    command line function to search and replace text
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | perl -p -i -e 's/oldstring/newstring/g' `find ./ -name "*.html"` | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | for f in $(ack-grep -l "head\.ready"); do sed -i -e "s/head\.ready/\$(document).ready/g" $f; done | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment