{"id":28287732,"url":"https://github.com/simplelinuxscripts/findlines","last_synced_at":"2026-03-09T10:01:13.726Z","repository":{"id":271936479,"uuid":"915035809","full_name":"simplelinuxscripts/findlines","owner":"simplelinuxscripts","description":"Linux bash script to find all lines or multi-line paragraphs containing a set of strings in filtered files of current folder and its subfolders recursively, in a simple way for most common usage, without need of complex regular expressions. Special characters and binary files contents can also be searched. Script format: .bash / .sh.","archived":false,"fork":false,"pushed_at":"2026-01-01T22:45:00.000Z","size":673,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-03T23:25:29.642Z","etag":null,"topics":["accented-characters","bash","find","grep","paragraphs","recursive","search","special-characters"],"latest_commit_sha":null,"homepage":"https://simplelinuxscripts.github.io/findlines/","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/simplelinuxscripts.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-10T20:34:48.000Z","updated_at":"2026-01-01T22:45:03.000Z","dependencies_parsed_at":"2025-03-23T20:24:26.687Z","dependency_job_id":"0b4be9e0-acdf-4bd2-9eae-2a67997085c6","html_url":"https://github.com/simplelinuxscripts/findlines","commit_stats":null,"previous_names":["simplelinuxscripts/findlines"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simplelinuxscripts/findlines","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplelinuxscripts%2Ffindlines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplelinuxscripts%2Ffindlines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplelinuxscripts%2Ffindlines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplelinuxscripts%2Ffindlines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simplelinuxscripts","download_url":"https://codeload.github.com/simplelinuxscripts/findlines/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simplelinuxscripts%2Ffindlines/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30290888,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"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":["accented-characters","bash","find","grep","paragraphs","recursive","search","special-characters"],"created_at":"2025-05-21T22:13:01.150Z","updated_at":"2026-03-09T10:01:13.634Z","avatar_url":"https://github.com/simplelinuxscripts.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"#### Linux bash script to find all lines or multi-line paragraphs containing a set of strings in filtered files of current folder and its subfolders recursively, in a simple way for most common usage, without need of complex regular expressions. Special characters and binary files contents can also be searched.  \r\n\r\n### USAGE:\r\n\r\n `fl [-i] [-p=N] [-w] [pathstr|/pathstr]* str [+|-|++|-- str]*`\r\n\r\n### DESCRIPTION:\r\n\r\n The goal of this linux bash script (`fl` for \"find lines\") is to simply and quickly display all the lines\r\n or multi-line paragraphs matching the `str` parameters in all the files filtered\r\n by the `pathstr` parameters, see below examples.  \r\n Special characters (like *, +, |, :, ...) do not need to be escaped, they are searched\r\n directly as provided in the `str` parameters, which makes the usage very simple.  \r\n Binary files contents can also be searched, so that as many matching lines as possible are\r\n displayed at the end and no occurrence is missed.\r\n\r\n### OPTIONS:\r\n\r\n `-i`: ignore lower/upper case during the search  \r\n `-p=N`: consider paragraphs of 2N+1 lines during the search (N \u003e= 1) instead of line\r\n       by line search (2N+1 = N lines before first str matching line + first str\r\n       matching line + N lines after first str matching line)  \r\n `-w`: first str to find shall be a whole word (word-constituent characters are letters,\r\n     digits and underscore)\r\n\r\n### EXAMPLES:\r\n\r\n `fl str`  \r\n   =\u003e find all lines containing str in all files of current folder and its subfolders  \r\n `fl .c str`  \r\n   =\u003e find all lines containing str in the .c files of current folder and its subfolders  \r\n `fl .c .h str1 + str2 - str3`  \r\n   =\u003e find all lines containing str1 and str2 and not str3 in the .c or .h files\r\n      of current folder and its subfolders  \r\n `fl .c .h str1 ++ str2 -- str3`  \r\n   =\u003e find all lines containing str1 and then str2 and then not str3 in the .c or .h files\r\n      of current folder and its subfolders    \r\n `fl mypathstr str`  \r\n   =\u003e find all lines containing str in the files of current folder and its subfolders\r\n      whose path contains \"mypathstr\" (\"mypathstr\" in file or folder names)  \r\n `fl .c /mypathstr str`  \r\n   =\u003e find all lines containing str in the .c files of current folder and its subfolders\r\n      whose path does not contain \"mypathstr\" (\"mypathstr\" not in file and folder names)  \r\n `fl -i .c str`  \r\n   =\u003e find all lines containing str in the .c files of current folder and its subfolders\r\n      with lower/upper case ignored  \r\n `fl -p=1 .c str1 + str2`  \r\n   =\u003e find all 3 lines long paragraphs containing str1 and str2 in the .c files\r\n      of current folder and its subfolders  \r\n `fl -p=2 .c str1 ++ str2 -- str3`  \r\n   =\u003e find all 5 lines long paragraphs containing str1 and then str2 and then not str3\r\n      in the .c files of current folder and its subfolders  \r\n `fl -w .c str`  \r\n   =\u003e find all lines containing the whole word \"str\" in the .c files of current folder\r\n      and its subfolders  \r\n\r\n Of course, all operators `+/-/++/--` and all options `-i/-p=N/-w` can be used jointly.\r\n\r\n Examples of searches with special characters:  \r\n \\- Special characters can be searched directly, for example\r\n   `fl \"(a*b+[(x/y)-z] || d == e \u0026 f)\"` will search exactly this string without need to escape\r\n   the special characters.  \r\n \\- Linux shell's special characters \\\\, \\$, \\` and \" shall be escaped with \\\\\\\\, \\\\\\$, \\\\\\` and \\\\\" respectively.\r\n    For example `fl \"\\\\xxx\\$\"` will search all lines containing \"\\\\xxx\\$\" in all files.  \r\n \\- Special characters can also be searched directly with their ASCII code, for example:  \r\n   `fl $'\\x09'` will search all lines containing tab characters (\\t) in all files,  \r\n   `fl $'\\x0D'` will search all lines containing carriage return characters (\\r) in all files.\r\n\r\nPractical examples:  \r\n\\- search of several consecutive strings (line by line search):  \r\n![image](https://github.com/simplelinuxscripts/findlines/blob/9ff03d9f8a1dc0d564a61585a9f4b95e053352bf/example_1.png)  \r\n\\- search of several consecutive strings in 3-line paragraphs:  \r\n![image](https://github.com/simplelinuxscripts/findlines/blob/9ff03d9f8a1dc0d564a61585a9f4b95e053352bf/example_2.png)  \r\n\r\n\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplelinuxscripts%2Ffindlines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimplelinuxscripts%2Ffindlines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimplelinuxscripts%2Ffindlines/lists"}