{"id":17614723,"url":"https://github.com/learnbyexample/ruby_scripting","last_synced_at":"2025-07-09T17:08:19.678Z","repository":{"id":108058823,"uuid":"126178804","full_name":"learnbyexample/Ruby_Scripting","owner":"learnbyexample","description":"examples based tutorial for Ruby scripting","archived":false,"fork":false,"pushed_at":"2020-10-01T08:35:04.000Z","size":205,"stargazers_count":69,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-09T17:08:16.579Z","etag":null,"topics":["ebook","linux","ruby","scripting","text-processing","workshop-materials"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/learnbyexample.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":"2018-03-21T12:57:56.000Z","updated_at":"2025-03-30T22:54:08.000Z","dependencies_parsed_at":"2023-03-30T04:47:53.033Z","dependency_job_id":null,"html_url":"https://github.com/learnbyexample/Ruby_Scripting","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/learnbyexample/Ruby_Scripting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learnbyexample%2FRuby_Scripting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learnbyexample%2FRuby_Scripting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learnbyexample%2FRuby_Scripting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learnbyexample%2FRuby_Scripting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/learnbyexample","download_url":"https://codeload.github.com/learnbyexample/Ruby_Scripting/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/learnbyexample%2FRuby_Scripting/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264502167,"owners_count":23618557,"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":["ebook","linux","ruby","scripting","text-processing","workshop-materials"],"created_at":"2024-10-22T18:44:41.552Z","updated_at":"2025-07-09T17:08:19.623Z","avatar_url":"https://github.com/learnbyexample.png","language":"Ruby","readme":"# \u003ca name=\"ruby-scripting\"\u003e\u003c/a\u003eRuby Scripting\n\n* Introduction to Ruby, syntax, issuing external commands, array/string methods, regular expressions, file processing and more...\n* Suitable for those already familiar with programming concepts like variables, printing, control structures, looping, arrays, etc\n    * If you are new to programming, check out [Think Ruby](https://github.com/learnbyexample/ThinkRubyBuild), a translation of **Think Python by Allen Downey** that I'm working on\n* This repo is also suitable as a material reference for a one/two day workshop\n* For more related resources, visit [scripting course](https://github.com/learnbyexample/scripting_course) and my programming blog https://learnbyexample.github.io\n\n\u003cbr\u003e\n\n# \u003ca name=\"chapters\"\u003e\u003c/a\u003eChapters\n\n:warning: :construction: Work in progress, stay tuned...\n\n* [Introduction](./chapters/Introduction.md)\n    * [Installation](./chapters/Introduction.md#installation), [Hello World example](./chapters/Introduction.md#hello-world-example), [Ruby REPL](./chapters/Introduction.md#ruby-repl)\n* [Numbers and Strings](./chapters/Numbers_and_Strings.md)\n    * [Numbers](./chapters/Numbers_and_Strings.md#numbers), [String](./chapters/Numbers_and_Strings.md#string), [Objects and Expressions](./chapters/Numbers_and_Strings.md#objects-and-expressions)\n* [Getting User input](./chapters/User_input.md)\n    * [String input](./chapters/User_input.md#string-input), [Converting string to other data types](./chapters/User_input.md#converting-string-to-other-data-types)\n* [Methods](./chapters/Methods.md)\n    * [Defining a method](./chapters/Methods.md#defining-a-method), [Arguments and Return](./chapters/Methods.md#arguments-and-return), [Default valued arguments](./chapters/Methods.md#default-valued-arguments), [Keyword arguments](./chapters/Methods.md#keyword-arguments), [Special method names](./chapters/Methods.md#special-method-names), [Variable Scope](./chapters/Methods.md#variable-scope)\n* [Control Structures](./chapters/Control_structures.md)\n    * [Boolean expressions](./chapters/Control_structures.md#boolean-expressions), [if](./chapters/Control_structures.md#if), [for](./chapters/Control_structures.md#for), [while](./chapters/Control_structures.md#while), [next and break](./chapters/Control_structures.md#next-and-break), [Variable Scope](./chapters/Control_structures.md#variable-scope)\n* [Executing external commands](./chapters/Executing_external_commands.md)\n    * [Issuing commands](./chapters/Executing_external_commands.md#issuing-commands), [Saving command output](./chapters/Executing_external_commands.md#saving-command-output)\n* [Arrays](./chapters/Arrays.md)\n    * [Assignment and Indexing](./chapters/Arrays.md#assignment-and-indexing), [Slicing](./chapters/Arrays.md#slicing), [Copying](./chapters/Arrays.md#copying), [Looping](./chapters/Arrays.md#looping), [Modifying elements](./chapters/Arrays.md#modifying-elements), [Filtering](./chapters/Arrays.md#filtering), [Sorting and company](./chapters/Arrays.md#sorting-and-company), [Transforming whole array](./chapters/Arrays.md#transforming-whole-array), [Miscellaneous](./chapters/Arrays.md#miscellaneous), [Getting Array as user input](./chapters/Arrays.md#getting-array-as-user-input)\n* [Hashes](./chapters/Hashes.md)\n    * [Initialization](./chapters/Hashes.md#initialization), [Accessing keys and values](./chapters/Hashes.md#accessing-keys-and-values), [Looping](./chapters/Hashes.md#looping), [Modifying elements](./chapters/Hashes.md#modifying-elements), [Filtering](./chapters/Hashes.md#filtering), [Transforming keys and values](./chapters/Hashes.md#transforming-keys-and-values), [Mutable keys](./chapters/Hashes.md#mutable-keys), [Miscellaneous](./chapters/Hashes.md#miscellaneous)\n* [Set](./chapters/Set.md)\n    * [Initialization](./chapters/Set.md#initialization), [Set operations](./chapters/Set.md#set-operations), [Miscellaneous](./chapters/Set.md#miscellaneous)\n* [String Methods](./chapters/String_methods.md)\n    * [String formatting](./chapters/String_methods.md#string-formatting), [Looping](./chapters/String_methods.md#looping), [Condition checks](./chapters/String_methods.md#condition-checks), [Case conversion](./chapters/String_methods.md#case-conversion), [Search and Replace](./chapters/String_methods.md#search-and-replace), [Splitting](./chapters/String_methods.md#splitting), [Character manipulations](./chapters/String_methods.md#character-manipulations), [Miscellaneous](./chapters/String_methods.md#miscellaneous)\n* [Regular Expressions](./chapters/Regular_expressions.md)\n    * [Why is it needed?](./chapters/Regular_expressions.md#why-is-it-needed), [Syntax and operators](./chapters/Regular_expressions.md#syntax-and-operators), [Anchors](./chapters/Regular_expressions.md#anchors), [Alternation and Grouping](./chapters/Regular_expressions.md#alternation-and-grouping), [Escaping metacharacters](./chapters/Regular_expressions.md#escaping-metacharacters), [Dot metacharacter and Quantifiers](./chapters/Regular_expressions.md#dot-metacharacter-and-quantifiers), [match, scan and globals](./chapters/Regular_expressions.md#match-scan-and-globals), [Character class](./chapters/Regular_expressions.md#character-class), [Groupings and backreferences](./chapters/Regular_expressions.md#groupings-and-backreferences), [Lookarounds](./chapters/Regular_expressions.md#lookarounds), [Modifiers](./chapters/Regular_expressions.md#modifiers), [Unicode](./chapters/Regular_expressions.md#unicode), [Miscellaneous](./chapters/Regular_expressions.md#miscellaneous), [Gotchas](./chapters/Regular_expressions.md#gotchas), [Further Reading](./chapters/Regular_expressions.md#further-reading)\n* [File Processing](./chapters/File_processing.md)\n    * [Modes and Encoding](./chapters/File_processing.md#modes-and-encoding), [Reading files](./chapters/File_processing.md#reading-files), [Writing files](./chapters/File_processing.md#writing-files), [Interacting with File System](./chapters/File_processing.md#interacting-with-file-system)\n* [Exercises](./chapters/Exercises.md)\n\n\u003cbr\u003e\n\n# \u003ca name=\"contributing\"\u003e\u003c/a\u003eContributing\n\n* Please open an issue for typos/bugs/suggestions/etc\n    * **Please open an issue for discussion before submitting PRs**\n* Share the repo with friends/colleagues, on social media, etc to help reach other learners\n* In case you need to reach me, mail me at `echo 'yrneaolrknzcyr.arg@tznvy.pbz' | tr 'a-z' 'n-za-m'` or send a DM via [twitter](https://twitter.com/learn_byexample)\n\n\u003cbr\u003e\n\n# \u003ca name=\"ebook\"\u003e\u003c/a\u003eebook\n\n* Read as ebook on [gitbook](https://learnbyexample.gitbooks.io/ruby-scripting/content/index.html)\n* All `legacy.gitbook.com` links are now automatically redirected to `gitbook.com`, so there's no longer an option to download ebooks for offline reading\n\n\u003cbr\u003e\n\n# \u003ca name=\"acknowledgements\"\u003e\u003c/a\u003eAcknowledgements\n\n* [ruby-lang documentation](https://www.ruby-lang.org/en/documentation/) - manuals, tutorials and references\n* [/r/ruby/](https://www.reddit.com/r/ruby/) - helpful forum for beginners and experienced programmers alike\n* [stackoverflow](https://stackoverflow.com/tags/ruby) - for getting answers to pertinent questions\n* [Ruby Tricks, Idiomatic Ruby, Refactorings and Best Practices](https://franzejr.github.io/best-ruby/index.html)\n\n\u003cbr\u003e\n\n# \u003ca name=\"license\"\u003e\u003c/a\u003eLicense\n\nThis work is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flearnbyexample%2Fruby_scripting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flearnbyexample%2Fruby_scripting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flearnbyexample%2Fruby_scripting/lists"}