https://github.com/learnbyexample/ruby_scripting
examples based tutorial for Ruby scripting
https://github.com/learnbyexample/ruby_scripting
ebook linux ruby scripting text-processing workshop-materials
Last synced: 3 months ago
JSON representation
examples based tutorial for Ruby scripting
- Host: GitHub
- URL: https://github.com/learnbyexample/ruby_scripting
- Owner: learnbyexample
- Created: 2018-03-21T12:57:56.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-10-01T08:35:04.000Z (about 5 years ago)
- Last Synced: 2025-07-09T17:08:16.579Z (3 months ago)
- Topics: ebook, linux, ruby, scripting, text-processing, workshop-materials
- Language: Ruby
- Homepage:
- Size: 200 KB
- Stars: 69
- Watchers: 5
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
* Introduction to Ruby, syntax, issuing external commands, array/string methods, regular expressions, file processing and more...
* Suitable for those already familiar with programming concepts like variables, printing, control structures, looping, arrays, etc
* 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
* This repo is also suitable as a material reference for a one/two day workshop
* For more related resources, visit [scripting course](https://github.com/learnbyexample/scripting_course) and my programming blog https://learnbyexample.github.io
:warning: :construction: Work in progress, stay tuned...
* [Introduction](./chapters/Introduction.md)
* [Installation](./chapters/Introduction.md#installation), [Hello World example](./chapters/Introduction.md#hello-world-example), [Ruby REPL](./chapters/Introduction.md#ruby-repl)
* [Numbers and Strings](./chapters/Numbers_and_Strings.md)
* [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)
* [Getting User input](./chapters/User_input.md)
* [String input](./chapters/User_input.md#string-input), [Converting string to other data types](./chapters/User_input.md#converting-string-to-other-data-types)
* [Methods](./chapters/Methods.md)
* [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)
* [Control Structures](./chapters/Control_structures.md)
* [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)
* [Executing external commands](./chapters/Executing_external_commands.md)
* [Issuing commands](./chapters/Executing_external_commands.md#issuing-commands), [Saving command output](./chapters/Executing_external_commands.md#saving-command-output)
* [Arrays](./chapters/Arrays.md)
* [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)
* [Hashes](./chapters/Hashes.md)
* [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)
* [Set](./chapters/Set.md)
* [Initialization](./chapters/Set.md#initialization), [Set operations](./chapters/Set.md#set-operations), [Miscellaneous](./chapters/Set.md#miscellaneous)
* [String Methods](./chapters/String_methods.md)
* [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)
* [Regular Expressions](./chapters/Regular_expressions.md)
* [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)
* [File Processing](./chapters/File_processing.md)
* [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)
* [Exercises](./chapters/Exercises.md)
* Please open an issue for typos/bugs/suggestions/etc
* **Please open an issue for discussion before submitting PRs**
* Share the repo with friends/colleagues, on social media, etc to help reach other learners
* 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)
* Read as ebook on [gitbook](https://learnbyexample.gitbooks.io/ruby-scripting/content/index.html)
* 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
* [ruby-lang documentation](https://www.ruby-lang.org/en/documentation/) - manuals, tutorials and references
* [/r/ruby/](https://www.reddit.com/r/ruby/) - helpful forum for beginners and experienced programmers alike
* [stackoverflow](https://stackoverflow.com/tags/ruby) - for getting answers to pertinent questions
* [Ruby Tricks, Idiomatic Ruby, Refactorings and Best Practices](https://franzejr.github.io/best-ruby/index.html)
This work is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/)