Coder Social home page Coder Social logo

filecontentssearch's Introduction

FileContentsSearch

A Java command-line program that recursively searches all text files for a given string in a given directory.

This tool searches through all text files within a given directory for given matches. It goes though all directories in the given directory as well. To use this, command-line arguments must be set. If you want to search in the current working directory, simply list only the matches you're searching for. If you want to search in a different directory, the first argument must start with "-dir:" with the path following. If the path has spaces in it, precede each space with a backslash (). After that, list the matches. To show help, the first argument must be "---help".

This tool is non-case sensitive, meaning that it will ignore the cases of searches. So if a text file contains "Hello!" and the match given is "hello", then "Hello!" will be listed. If a desired match contains several words, surround these with double quotation marks ("). For example, to search for "good bye", the command would look like this:

java -jar FCS.jar -dir:<dir> "good bye"

If you want to ignore some text, precede the text with two dashes (--). Any line containing this in the given text files will not be listed in the output. In addition, quotation marks can also be used if the match to ignore has more than one word. For example, to list any line that contains "Hello" but not "Hello World!", the command would look like this:

java -jar FCS.jar -dir:<dir> Hello --"Hello World!"

Here are some more examples of ways to use this:

java -jar FCS.jar hi! --hello "good day" will list lines containing "hi!", and "good day" unless the line contains "hello"

filecontentssearch's People

Contributors

droverbuild avatar

Stargazers

 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.