Code Monkey home page Code Monkey logo

umat-606_mini_project's Introduction

Usage Instructions

This repository contains three files: srep, repl_l, and repl_c, each designed to perform specific text manipulation tasks akin to commonly used Linux commands.

How to Use:

#Go to the Directory
#where you can find install.sh
#Open terminal and run these commands

chmod u+x install.sh &&  ./install.sh

srep

bash Usage: srep pattern [options] [file ....] 

srep is a versatile script that mimics the functionality of the grep command in Linux. It searches for a specified pattern in one or more files and outputs lines or highlights the words containing the pattern.

Options:

  • -i : Ignore case distinctions.
  • -w : Match whole words only.
  • -c : Display count of matching lines.
  • -n : Display line numbers along with matching lines.

repl_l

bash Usage: repl_l linenumber "string" file

repl_l is a script designed to replace a line in a specified file at a given linenumber with the provided "string".

repl_c

Usage: repl_c file "string1" "string2"

repl_c allows users to replace occurrences of "string1" with "string2" in the specified file.

Example Usage:

  • To search for the pattern "example" in a file named sample.txt ignoring case distinctions and displaying line numbers:

    srep -i -n "example" sample.txt
  • To replace line number 5 in file.txt with the string “Hello World”:

    repl_l 5 "Hello World" file.txt
  • To replace occurrences of "old" with "new" in data.txt:

    repl_c data.txt "old" "new"

Please ensure you have appropriate permissions to execute these scripts and provide valid inputs as specified in the usage instructions.

For more details on each command's usage and options, refer to the respective script files.

Note: These scripts are designed for basic text manipulation tasks and may not encompass the full functionality of their counterparts in the Linux environment. Feel free to modify and extend them according to your requirements.

Author:

Name - Siba charan Das

Regd. No - 211214

III B.Sc (Hons.)(Mathematics)

UCSC-606 : Mini Project

umat-606_mini_project's People

Contributors

ginzura avatar

Watchers

 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.