Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chas (char + has)

chas is a lightweight CLI utility that reads lines from standard input and filters them based on whether they contain a specific set of characters.

Installation

go install github.com/Nadim147c/chas@latest

Usage

Pass the characters you are looking for as arguments, and pipe your text into chas.

# Basic usage
chas abc < file.txt

# Using multiple arguments (joined automatically)
echo "hello world" | chas hlo

How it works

chas performs an AND operation on the provided characters. A line will only be printed to stdout if all the characters specified are present somewhere within that line.

Input Command Output Reason
apple chas ap apple Contains both 'a' and 'p'
apple chas az (nothing) Missing 'z'
banana chas nna banana Contains 'n', 'n', and 'a'

License

Licensed under GPL-3.0!

About

🔥 Filter lines that contain a specific set of characters

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages