Giter VIP home page Giter VIP logo

re's Introduction

re - Quick File Content Replacer

A command-line utility to search and optionally replace patterns in files across directories. This tool provides a simple interface to make sweeping changes to files without the need for complicated commands or scripts.


Features

  • Easy Search & Replace: Find and replace patterns across multiple files and directories.
  • Include/Exclude Patterns: Ability to specify which files to include or exclude using regular expressions.
  • Dry Run: Preview changes before applying them.
  • Optimized: Skips larger files and uses efficient search algorithms for faster performance.

Installation

Using go install

Run the following command to install re:

go install github.com/4thel00z/re/...@latest

Make sure your $GOPATH/bin is in your $PATH to use the re command anywhere.


Usage

  1. Basic Search:

    Replace the term "needle" with "replacement" in the current directory (dry run):

    re needle replacement
  2. Applying Changes:

    To apply the replacements:

    re -f needle replacement
  3. Specifying Directories:

    Search and replace in specific directories:

    re needle replacement dir1 dir2
  4. Include/Exclude Patterns:

    Use -i to specify file patterns to include and -e to exclude:

    re -i "*.js,*.html" -e ".git" needle replacement

For additional options and usage details:

re --help

Contributing

Contributions are always welcome! See the CONTRIBUTING.md file for guidelines.


License

This project is licensed under the GPL-3 license.

re's People

Contributors

4thel00z avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.