Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/officialrealtm/ct_keyword_checker
Bash Script for checking text for keywords.
https://github.com/officialrealtm/ct_keyword_checker
Last synced: 9 days ago
JSON representation
Bash Script for checking text for keywords.
- Host: GitHub
- URL: https://github.com/officialrealtm/ct_keyword_checker
- Owner: officialrealTM
- Created: 2024-03-11T16:37:53.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-11T17:08:31.000Z (10 months ago)
- Last Synced: 2024-11-08T18:52:02.466Z (2 months ago)
- Language: Shell
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# How to use "ct_keyword_checker"
# About the files:
## `clear.sh`
This file is the main script responsible for all the "magic". It checks if the words from the **wordfile** exist in the **textfile**.## `wordfile`
This file needs to be created **once** with this command:touch wordfile
**Important:** Please make sure that this file has **no** file extension such as '.txt' or similar!## `texfile`
This file needs to be created **once** as well. To do so, use this command:touch textfile
**Important:** Please make sure that this file has **no** file extension such as '.txt' or similar!
## `clear.sh`
This is a little tool (two lines actually) which helps clearing both the **textfile** and the **wordfile**.
If you just want to clear the content of **one** file use this syntax:echo "" > [filename]
# Prerequisites
- This script needs to be executed in a Linux environment. This can either be a server (VPS) or similar or - what I would recommend - Linux WSL (Windows Subsystem for Linux). [Learn how to install WSL.](https://contabo.com/blog/how-to-install-wsl2-on-windows-10/)
- Git installed in your environment. (If not installed, install it with `apt install git -y`
# Installation
Install/download the script with this command:git clone https://github.com/officialrealTM/ct_keyword_checker.git
If neccessary, make the two scripts executeable with these commands:chmod +x check.sh
chmod +x clear.sh
# Running the Script
Before running the script make sure that both files - **wordfile** and **textfile** exist and got content in it.
**Important:** Each keyword or keyphrase in the wordfile needs to be in their own line!Now execute the script following this syntax:
./check.sh [true/false]
The parameter "true" or "false" define if the keyword check should be case-sensitive.
If you **don't** want the search to be case-sensitive use the parameter `false` when executing the script.### Possible Output
A sample output could look like this:![Sample Output](https://share.realtm.de/kw_output_sample.png)
The first part of the output shows the respective keyword and the number of times it was found.
The second part shows all keywords that weren't found in the text.