{"id":22206266,"url":"https://github.com/septiscom/rnscript","last_synced_at":"2026-04-27T18:34:46.399Z","repository":{"id":264963075,"uuid":"894758898","full_name":"Septiscom/rnscript","owner":"Septiscom","description":"File search scripts. This repository contains a Bash script and a Tcl script that together allow you to search for files in the current directory based on a specified pattern. The results are logged to a specified log file.","archived":false,"fork":false,"pushed_at":"2024-11-27T19:03:43.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-25T03:36:02.738Z","etag":null,"topics":["bash-script","tcl-scripts"],"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/Septiscom.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":"2024-11-26T23:53:49.000Z","updated_at":"2024-11-27T19:03:46.000Z","dependencies_parsed_at":"2024-11-27T01:31:45.661Z","dependency_job_id":null,"html_url":"https://github.com/Septiscom/rnscript","commit_stats":null,"previous_names":["septiscom/rnscript"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Septiscom%2Frnscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Septiscom%2Frnscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Septiscom%2Frnscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Septiscom%2Frnscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Septiscom","download_url":"https://codeload.github.com/Septiscom/rnscript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245394774,"owners_count":20608123,"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":["bash-script","tcl-scripts"],"created_at":"2024-12-02T18:10:29.999Z","updated_at":"2026-04-27T18:34:46.354Z","avatar_url":"https://github.com/Septiscom.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# File Search Scripts\r\n\r\nThis repository contains a Bash script and a Tcl script that together allow you to search for files in the current directory based on a specified pattern. The results are logged to a specified log file.\r\n\r\n## Installation\r\n\r\nTo use the file search scripts, you need to clone this repository to your local machine.\r\n\r\n1.Use the following command to clone the repository\r\n```bash\r\ngit clone https://github.com/Septiscom/rnscript.git\r\n```\r\n2.Make the scripts executable:\r\n```bash\r\nchmod +x rnscript.sh srchscript.tcl\r\n```\r\n3.Ensure Tcl is installed on your system. Check using:\r\n```bash\r\ntclsh --version\r\n```\r\n## Scripts Overview\r\n\r\n### 1. rnscript.sh\r\n\r\nA Bash script that:\r\n- Accepts a directory, file pattern, and optional mode arguments.\r\n- Logs all actions to a log file with a timestamp.\r\n- Invokes the `srchscript.tcl` script to search for files matching the provided pattern in the specified directory.\r\n\r\nUsage:\r\n\r\n```bash\r\n./rnscript.sh [directory] [pattern] [-silent|-verbose]\r\n\r\nOptions:\r\n\r\n    directory: Directory to search files in (default: current directory).\r\n    pattern: File name pattern to search (supports wildcards).\r\n    -silent | -s: Suppress all output.\r\n    -verbose | -v: Enable detailed output.\r\n    -help | -h: Display help.\r\n\r\nExample Usage:\r\n\r\n1.Search for all .txt files in the current directory:\r\n      ./rnscript.sh . \"*.txt\"\r\n\r\n2.Search for all .log files in /var/log with verbose output:\r\n      ./rnscript.sh /var/log \"*.log\" -v\r\n```\r\n### 2. srchscript.tcl\r\n\r\nA Tcl script that:\r\n- Searches the specified directory for files that match the provided pattern.\r\n- Handles optional modes: silent (no output) and verbose (additional logging).\r\n- Prints the matching file names to the console.\r\n\r\nUsage:\r\n```bash\r\ntclsh srchscript.tcl \u003cdirectory\u003e \u003csearch_pattern\u003e \u003csilent\u003e \u003cverbose\u003e\r\n\r\nExample Usage:\r\n\r\n1.Search for .conf files in /etc without suppressing output:\r\n      tclsh srchscript.tcl /etc \"*.conf\" 0 0\r\n\r\n2.Search with verbose logging enabled:\r\n      tclsh srchscript.tcl /etc \"*.conf\" 0 1\r\n```\r\n## Prerequisites\r\n\r\n- **Bash**: The `rnscript.sh` Bash script should run on any Unix-like system that supports Bash.\r\n- **Tcl**: The `srchscript.tcl` Tcl script requires Tcl to be installed. You can check if Tcl is installed with the command:\r\n  ```bash\r\n  tclsh --version\r\n  ```\r\n- Use `chmod +x rnscript.sh srchscript.tcl` to make the shell script executable.\r\n  \r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseptiscom%2Frnscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseptiscom%2Frnscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseptiscom%2Frnscript/lists"}