{"id":20601872,"url":"https://github.com/tomasfn87/bci","last_synced_at":"2025-03-06T16:21:04.009Z","repository":{"id":171480082,"uuid":"411107465","full_name":"tomasfn87/bci","owner":"tomasfn87","description":"Download Linux CLI tool here! - Search Script for Bash","archived":false,"fork":false,"pushed_at":"2024-04-06T22:08:57.000Z","size":116,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-17T01:48:21.365Z","etag":null,"topics":["grep","linux-cli","linux-shell","search"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/tomasfn87.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}},"created_at":"2021-09-28T02:16:31.000Z","updated_at":"2023-07-04T19:51:20.000Z","dependencies_parsed_at":"2024-04-06T23:21:56.685Z","dependency_job_id":"be1641a4-f78d-43c5-96a9-4a7c1b04f750","html_url":"https://github.com/tomasfn87/bci","commit_stats":null,"previous_names":["tomasfn87/bci"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasfn87%2Fbci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasfn87%2Fbci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasfn87%2Fbci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasfn87%2Fbci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomasfn87","download_url":"https://codeload.github.com/tomasfn87/bci/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242241246,"owners_count":20095339,"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":["grep","linux-cli","linux-shell","search"],"created_at":"2024-11-16T09:12:17.488Z","updated_at":"2025-03-06T16:21:03.992Z","avatar_url":"https://github.com/tomasfn87.png","language":"Shell","readme":"# `bci` / `gbci`\n\n\u003cbr\u003e\n\n## *Search Script for* `GNU/Linux`\n\n\u003cbr\u003e\n\n- `bci` and `gbci` use `egrep` and `grep` to show a list a of files that contain a piece of text, showing the user a pretty colored output;\n- the first element of each line of a sucessfull search is the number of ocurrences, and the second is the filepath where the specified text was found;\n- if the specified directory doesn't exists, a corresponding **Error** message will be thrown.\n\n---\n\n\u003cbr\u003e\n\n- Get this CLI tool for your `Linux` distro by using the `install` command below;\n- Two new commands will be at your disposal:\n  - `bci`;\n  - `gbci`.\n- They work the same way, but `bci` output is __red__;\n- In case you prefer a more *__Old School__* style, `gbci` stands for *__green__* `bci`; it's also useful when further refining the search with `grep`, whose highlighting is already red.\n\n---\n\n\u003cbr\u003e\u003cbr\u003e\n\n## Commands\n\n### *Install*:\n\n```shell\nsudo git clone --depth 1 --no-checkout https://github.com/tomasfn87/bci /usr/local/lib/bci \u0026\u0026 pushd /usr/local/lib/bci \u0026\u0026 sudo git sparse-checkout set {g,}bci.sh \u0026\u0026 sudo git checkout \u0026\u0026 sudo ln -rs /usr/local/lib/bci/bci.sh /usr/local/bin/bci \u0026\u0026 sudo ln -rs /usr/local/lib/bci/gbci.sh /usr/local/bin/gbci \u0026\u0026 popd \u0026\u0026 echo \"\\nUse commands bci and gbci to search through the files' content in a directory.\"\n```\n\n### *Uninstall*:\n\n```shell\nsudo rm -rf /usr/local/{lib/bci,bin/{g,}bci}\n```\n\n### *Update*:\n\n```shell\nsudo rm -rf /usr/local/lib/bci \u0026\u0026 sudo git clone --depth 1 --no-checkout https://github.com/tomasfn87/bci /usr/local/lib/bci \u0026\u0026 pushd /usr/local/lib/bci \u0026\u0026 sudo git sparse-checkout set {g,}bci.sh \u0026\u0026 sudo git checkout \u0026\u0026 popd \u0026\u0026 echo \"\\nbci and gbci were updated to the latest version.\"\n```\n\n---\n\n\u003cbr\u003e\u003cbr\u003e\n\n## Arguments\n\n- `SEARCH_TERM`: _the 1\u003csup\u003est\u003c/sup\u003e argument is the_ SEARCH TERM _that will be searched inside all the files available_;\n- `SEARCH_DIRECTORY`: _the 2\u003csup\u003end\u003c/sup\u003e argument is the_ SEARCH DIRECTORY _where the search will take place_.\n\n---\n\n\u003cbr\u003e\u003cbr\u003e\n\n## _Examples_:\n\n*Basic operations*:\n\n\u003cbr\u003e\n\n```shell\nbci 'import datetime as dt' ~/python\n```\n\n*Search for* `import datetime as dt` *into folder* `~/python`\n\n\u003cbr\u003e\n\n```shell\ngbci export\\ default /home/user/mySite\n```\n\n*Search for* `export default` *into folder* `/home/user/mySite`\n\n---\n\n\u003cbr\u003e\u003cbr\u003e\n\n*Further refining the search*:\n\n\u003cbr\u003e\n\n```shell\ngbci export\\ default /home/user/mySite | grep \\\\.ts\n\n# or\n\ngbci \"export default\" /home/user/mySite | grep \\\\.\\[jt\\]s\n```\n\n- *Refine the search further by piping* `grep`;\n- *Works better with* `gbci` *because* `grep` *uses* **red** *to mark the returned results*.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasfn87%2Fbci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomasfn87%2Fbci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasfn87%2Fbci/lists"}