npx skills add smithery/pluginagentmarketplace --skill text-processing
pluginagentmarketplace/custom-plugin-bash-shell · Archived
text-processing
Production-grade text processing - grep, sed, awk, regex
Installation
npx skills add pluginagentmarketplace/custom-plugin-bash-shell --skill text-processing
Stronger alternatives
This repository is archived — consider an actively maintained alternative.
Production-grade shell tools - jq, xargs, parallel, pipelines
2 installsProduction-grade shell networking - curl, ssh, ports, debugging
1 installsProduction-grade shell automation - scripts, CI/CD, makefiles
1 installsProduction-grade process management - jobs, signals, cron, systemd
1 installsSimilar popular skills
Related neighbors and high-traction skills in the same topics — useful to compare before installing.
Helps users discover and install agent skills when they ask questions like "how do I do X", "fi…
3.3M installsBrowser automation CLI for AI agents. Use when the user needs to interact with websites, includ…
810.4K installsReview UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "chec…
617.3K installsBuild, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and …
576.5K installsPrepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Te…
568.3K installsAlso in this package
Other skills from pluginagentmarketplace/custom-plugin-bash-shell.
npx skills add pluginagentmarketplace/custom-plugin-bash-shell
Browse all from pluginagentmarketplace/custom-plugin-bash-shell
More details
Agent compatibility
Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.
Also listed on
Alternate registries and mirrors of this skill.
Repository health
main
Skill metadata
Parsed from SKILL.md frontmatter.
Package contents
Files included with this skill beyond the listing page.
-
skill md
SKILL.md4,131 B -
docs
SUMMARY.md79 B
History
- First seen on skills.sh
- First recorded snapshot · 1 installs
SKILL.md
Text Processing Skill
Master text manipulation with grep, sed, awk, and regular expressions
Learning Objectives
After completing this skill, you will be able to:
- Search files efficiently with grep and ripgrep
- Transform text with sed substitutions
- Process structured data with awk
- Write and debug regular expressions
- Build efficient text processing pipelines
Prerequisites
- Bash basics (variables, control flow)
- Command line navigation
- Understanding of stdin/stdout
Core Concepts
1. Grep Essentials
# Basic search
grep 'pattern' file.txt
grep -i 'pattern' file.txt # Case insensitive
grep -v 'pattern' file.txt # Invert match
grep -n 'pattern' file.txt # Line numbers
grep -c 'pattern' file.txt # Count only
# Extended regex
grep -E 'pat1|pat2' file.txt
grep -E '^start.*end$' file.txt
# Recursive search
grep -r 'pattern' ./
grep -rn --include='*.py' 'def ' ./
2. Sed Essentials
# Substitution
sed 's/old/new/' file # First match
sed 's/old/new/g' file # All matches
sed -i 's/old/new/g' file # In-place
# Line operations
sed -n '5p' file # Print line 5
sed '5d' file # Delete line 5
sed '/pattern/d' file # Delete matching
# Multiple operations
sed -e 's/a/b/' -e 's/c/d/' file
3. Awk Essentials
# Field processing
awk '{print $1}' file # First field
awk -F: '{print $1}' file # Custom delimiter
awk '{print $NF}' file # Last field
# Patterns
awk '/pattern/' file # Match lines
awk '$3 > 100' file # Condition
# Calculations
awk '{sum+=$1} END{print sum}' file
awk 'NR>1 {total++} END{print total}' file
4. Regex Quick Reference
# Metacharacters
. # Any character
^ # Start of line
$ # End of line
* # Zero or more
+ # One or more (ERE)
? # Zero or one (ERE)
# Character classes
[abc] # Any of a, b, c
[^abc] # Not a, b, c
[a-z] # Range
\d # Digit (PCRE)
\w # Word char (PCRE)
\s # Whitespace (PCRE)
Common Patterns
Log Analysis
# Count requests by IP
awk '{print $1}' access.log | sort | uniq -c | sort -rn
# Find errors
grep -E 'ERROR|FATAL' app.log | tail -20
# Extract timestamps
grep 'ERROR' app.log | sed 's/.*\[\([^]]*\)\].*/\1/'
Data Transformation
# CSV to TSV
sed 's/,/\t/g' data.csv
# JSON value extraction
grep -oP '"name":\s*"\K[^"]+' data.json
# Remove blank lines
sed '/^$/d' file.txt
Anti-Patterns
| Don't | Do | Why | |
|---|---|---|---|
| `cat file \ | grep` | grep pattern file |
Useless use of cat |
| Multiple sed calls | Single sed with -e |
Reduces overhead | |
grep -E ".*" |
Omit if not needed | Slower with regex |
Practice Exercises
- Log Parser: Extract top 10 IPs from access log
- CSV Filter: Filter CSV rows by column value
- Config Editor: Update config values with sed
- Report Generator: Summarize data with awk
Troubleshooting
Common Errors
| Error | Cause | Fix | |
|---|---|---|---|
Invalid regex |
Bad pattern | Escape special chars | |
No match |
Wrong case | Use -i flag |
|
sed delimiter |
/ in pattern |
Use # or `\ |
` |
Debug Techniques
# Test regex online
# https://regex101.com/
# Print matched groups
echo "test" | sed -n 's/\(.*\)/\1/p'
# Debug awk
awk '{print NR, NF, $0}' file
Performance Tips
# Use ripgrep for speed
rg 'pattern' --type py
# Set locale for speed
LC_ALL=C grep 'pattern' file
# Limit output
grep -m 10 'pattern' file