{"id":17788699,"url":"https://github.com/devel0/shu","last_synced_at":"2026-05-08T01:34:14.524Z","repository":{"id":122983032,"uuid":"211702542","full_name":"devel0/shu","owner":"devel0","description":"Shell utilities","archived":false,"fork":false,"pushed_at":"2023-08-29T19:46:35.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-23T16:42:58.787Z","etag":null,"topics":["csharp","dotnet","logic-analyzer","marlin-firmware","shell","utilities"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devel0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-09-29T17:49:49.000Z","updated_at":"2021-12-05T16:42:24.000Z","dependencies_parsed_at":"2024-10-27T10:39:28.049Z","dependency_job_id":"dbb15251-4a66-4a06-bc69-fe9b5aec3bad","html_url":"https://github.com/devel0/shu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devel0%2Fshu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devel0%2Fshu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devel0%2Fshu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devel0%2Fshu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devel0","download_url":"https://codeload.github.com/devel0/shu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246734142,"owners_count":20825088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["csharp","dotnet","logic-analyzer","marlin-firmware","shell","utilities"],"created_at":"2024-10-27T10:20:53.112Z","updated_at":"2026-05-08T01:34:14.486Z","avatar_url":"https://github.com/devel0.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# shu\n\n[![NuGet Badge](https://buildstats.info/nuget/shu/)](https://www.nuget.org/packages/shu/)\n\nSHell Utilities\n\n\u003chr/\u003e\n\n\u003c!-- TOC --\u003e\n- [Quickstart](#quickstart)\n- [enable completion](#enable-completion)\n- [command line](#command-line)\n  - [match regex](#match-regex)\n  - [replace token](#replace-token)\n- [How this project was built](#how-this-project-was-built)\n- [old version w/analyzer tool](#old-version-wanalyzer-tool)\n\u003c!-- TOCEND --\u003e\n\n\u003chr/\u003e\n\n## Quickstart\n\n- Requirements: [Download NET Core SDK](https://dotnet.microsoft.com/download)\n- Install the tool:\n\n```sh\ndotnet tool update -g shu\n```\n\n- if `~/.dotnet/tools` dotnet global tool isn't in path it can be added to your `~/.bashrc`\n\n```sh\necho 'export PATH=$PATH:~/.dotnet/tools' \u003e\u003e ~/.bashrc\n```\n\n## enable completion\n\nto enable completion edit `/etc/bash_completion.d/shu`\n\n```sh\n_fn() {  \n        COMPREPLY=($(SHOW_COMPLETIONS=1 shu ${COMP_LINE:2}))\n}\ncomplete -F _fn shu\n```\n\n## command line\n\n```sh\ndevel0@main:~$ shu\nmissing command\n\nUsage: shu COMMAND FLAGS\n\nshell utils\n\nCommands:\n  replace-token   replace token from given standard input (not optimized for huge files)\n\nGlobal flags:\n  -h              show usage\n```\n\n### match regex\n\n```sh\nUsage: shu match-regex FLAGS regex fmt\n\nmatch regex groups\n\nGlobal flags:\n  -h,--help   show usage\n\nParameters\n  regex       c# regex\n  fmt         format string ( use \\N to print Nth group in place )\n```\n\n**example**\n\n```sh\ndevel0@tuf:/opensource/shu$ acpi -b\nBattery 0: Unknown, 97%\ndevel0@tuf:/opensource/shu$ acpi -b | shu match-regex '[,\\s]*(\\d+)%' 'battery percent is [\\\\1]'\nbattery percent is [97]\n```\n\n### replace token\n\n```sh\nUsage: shu replace-token FLAGS token replacement\n\nreplace token from given standard input (not optimized for huge files)\n\nOptional flags:\n  -csregex      token will treated as csharp regex\n\nGlobal flags:\n  -h,--help     show usage\n\nParameters\n  token         token to search for\n  replacement   text to replace where token was found\n```\n\n[**example**](https://github.com/devel0/security-manager/blob/8ed0f574fa649d5131d2ea2ea8e2dea5338500d2/docker/Dockerfile#L49-L52)\n\n## How this project was built\n\n```sh\nmkdir shu\ncd shu\n\ndotnet new sln\ndotnet new console -n shu\n\ncd shu\ndotnet add package netcore-util\ndotnet add package netcore-cmdline\ncd ..\n\ndotnet sln shu.sln add shu\ndotnet build\n```\n\n## old version w/analyzer tool\n\nYou can find old version 0.6.0 with analyzer tool [here](https://github.com/devel0/shu/tree/0a0d1b9a115c7d9262b947dd6a68469093de5fd1#logic2-freq-graph)\n\nto install that version use\n\n```sh\ndotnet tool install --global shu --version 0.6.0\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevel0%2Fshu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevel0%2Fshu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevel0%2Fshu/lists"}