{"id":23497994,"url":"https://github.com/freedomben/tool-in-awk","last_synced_at":"2026-02-05T10:03:34.974Z","repository":{"id":69605499,"uuid":"257396749","full_name":"FreedomBen/tool-in-awk","owner":"FreedomBen","description":"A quick demo of using Awk in place of easier-to-use unix tools","archived":false,"fork":false,"pushed_at":"2020-04-20T20:34:46.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-04T16:16:41.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FreedomBen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-20T20:31:50.000Z","updated_at":"2020-04-20T20:34:49.000Z","dependencies_parsed_at":"2023-05-31T12:52:12.916Z","dependency_job_id":null,"html_url":"https://github.com/FreedomBen/tool-in-awk","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FreedomBen/tool-in-awk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreedomBen%2Ftool-in-awk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreedomBen%2Ftool-in-awk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreedomBen%2Ftool-in-awk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreedomBen%2Ftool-in-awk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FreedomBen","download_url":"https://codeload.github.com/FreedomBen/tool-in-awk/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FreedomBen%2Ftool-in-awk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29119219,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T09:40:36.738Z","status":"ssl_error","status_checked_at":"2026-02-05T09:36:49.977Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-25T05:17:44.767Z","updated_at":"2026-02-05T10:03:34.937Z","avatar_url":"https://github.com/FreedomBen.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# tool-in-awk\n\nYou don't need `\u003ccommon-tool\u003e` because you can use `awk`!\n\n## cat\n\nStill using `cat` when `awk` is so much more 1337?\n\nInstead of:\n\n```bash\ncat *.txt\n```\n\nUse:\n\n```bash\nawk '{ print }' *.txt\n```\n\n## grep\n\nInstead of:\n\n```bash\ngrep -E '\u003cyour regex\u003e' *.txt\n# or\nsome_command | grep -E '\u003cyour regex\u003e'\n```\n\nUse:\n\n```bash\nawk '/\u003cyour regex\u003e/' *.txt\n# or\nsome_command | awk '/\u003cyour regex\u003e/'\n```\n\n## sed\n\nInstead of:\n\n```bash\nsed -E 's/\u003cyour regex\u003e/your replacment/g' *.txt\n# or\nsome_command | sed -E 's/\u003cyour regex\u003e/your replacment/g' *.txt\n```\n\nUse:\n\n```bash\nawk '{ gsub(/command/, \"shamand\"); print }' *.txt\n# or\nsome_command | awk '{ gsub(/command/, \"shamand\"); print }'\n```\n\n## wc\n\nInstead of:\n\n```bash\nwc myfile.txt\n```\n\nUse:\n\n```bash\nawk '{ w += NF; c += length + 1 }; END {print NR, w, c, FILENAME }' myfile.txt\n```\n\nWay easier!\n\n## Conclusion\n\nUse the best tool for the job, and in every possible case, that best tool is `awk`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreedomben%2Ftool-in-awk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreedomben%2Ftool-in-awk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreedomben%2Ftool-in-awk/lists"}