{"id":24122180,"url":"https://github.com/tlinden/subst","last_synced_at":"2026-06-09T03:06:11.936Z","repository":{"id":215245015,"uuid":"738449293","full_name":"TLINDEN/subst","owner":"TLINDEN","description":null,"archived":false,"fork":false,"pushed_at":"2024-01-03T09:51:21.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-11T11:41:51.372Z","etag":null,"topics":["command-line-tool","files","perl","regex","rename","rename-files","rename-script","replace-text","replacer","utitlity"],"latest_commit_sha":null,"homepage":"https://www.daemon.de/projects/scripts/subst/","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TLINDEN.png","metadata":{"files":{"readme":"README.pod","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":"2024-01-03T08:56:02.000Z","updated_at":"2025-01-08T12:49:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"2764296a-1928-44e7-9d1a-bcd2b96fae8c","html_url":"https://github.com/TLINDEN/subst","commit_stats":null,"previous_names":["tlinden/subst"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TLINDEN%2Fsubst","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TLINDEN%2Fsubst/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TLINDEN%2Fsubst/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TLINDEN%2Fsubst/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TLINDEN","download_url":"https://codeload.github.com/TLINDEN/subst/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241210930,"owners_count":19927817,"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":["command-line-tool","files","perl","regex","rename","rename-files","rename-script","replace-text","replacer","utitlity"],"created_at":"2025-01-11T11:38:47.689Z","updated_at":"2026-06-09T03:06:06.918Z","avatar_url":"https://github.com/TLINDEN.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"=head4 subst - commandline tool to replace file contents or file names\n\nThis script can be used to replace something in a file or filename by using perl\nregular expressions. It can also be used to rename files based on regexes.\n\n=head4 Usage\n\n    Usage: subst  [-M \u003cperl module\u003e] [-t]  -r 's/old/new/\u003cflags\u003e' [ -r '...', ...] [\u003cfile\u003e ...     | /regex/]\n           subst  [-M \u003cperl module\u003e] [-tR] -m 's/old/new/\u003cflags\u003e' [ -m '...', ...] [\u003cfile|dir\u003e ... | /regex/]\n    \n    Options:\n     -r        replace contents of file(s)\n     -m        rename file(s)\n     -R        recursive (only used in conjunction with -m)\n     -M        load additional perl module to enhance /e functionality.\n     -t        test mode, do not overwrite file(s)\n    \n    Samples:\n     - replace \"tom\" with \"mac\" in all *.txt files:\n       subst -r 's/tom/mac/g' *.txt\n    \n     - rename all jpg files containing whitespaces:\n       subst -m 's/ /_/g' '/.jpg/'\n    \n     - decode base64 encoded contents\n       subst -M MIME::Base64 -r 's/([a-zA-Z0-9]*)$/decode_base64($1)/gem' somefile\n    \n     - turn every uri into a link\n       subst -M \"Regexp::Common qw /URI/\" -r 's#($RE{URI}{HTTP})#\u003ca href=\"$a\"\u003elink\u003c/a\u003e#g' somefile\n    \n    If \u003cfile\u003e is -, STDIN will be used as input file, results will be printed\n    to STDOUT. -t does not apply for STDIN input.\n    \n    Substitution regex must be perlish. See 'perldoc perlre' for details.\n\n=head4 Samples\n\nreplace \"tom\" with \"mac\" in all *.txt files:\n\n   subst -r 's/tom/mac/g' *.txt\n\nrename all jpg files containing whitespaces:\n\n   subst -m 's/ /_/g' '/.jpg/'\n\ndecode base64 encoded contents\n\n   subst -M MIME::Base64 -r 's/([a-zA-Z0-9]*)$/decode_base64($1)/gem' somefile\n\nturn every uri into a link\n\n   subst -M \"Regexp::Common qw /URI/\" -r 's#($RE{URI}{HTTP})#\u003ca href=\"$a\"\u003elink\u003c/a\u003e#g' somefile\n\n=head4 DEPENDENCIES\n\nB\u003csubst\u003e is a perl script and as such needs perl.\n\n=head4 Installation\n\nCopy L\u003csubst|https://github.com/TLINDEN/subst/blob/main/subst\u003e to B\u003c$HOME/bin/subst\u003e, that's all.\nNo additional perl modules are required.\n\n=head4 Version\n\n1.1.5.\n\nCopyright (c) 2002-2021 - T.v. Dein\n\n=cut\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlinden%2Fsubst","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftlinden%2Fsubst","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftlinden%2Fsubst/lists"}