Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve arrays chapter #156

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
bobbyiliev merged 1 commit into main from improve-arrays-chapter
Aug 4, 2024
Merged

Improve arrays chapter #156

bobbyiliev merged 1 commit into main from improve-arrays-chapter
Aug 4, 2024

Conversation

@bobbyiliev
Copy link
Owner

@bobbyiliev bobbyiliev commented Aug 2, 2024

What type of PR is this? (check all applicable)

  • ♻️ Refactor
  • ✨ Feature
  • 🐛 Bug Fix
  • 👷 Optimization
  • 📝 Documentation Update
  • 🚩 Other

Description

Bug: Substring in Bash :: Slicing - Examples incorrect

Related Tickets & Documents

Fixes #153

Added to documentation?

  • 📜 readme
  • 🙅 no documentation needed

Copy link

what-the-diff bot commented Aug 2, 2024

PR Summary

  • Book Updated
    The book version has been updated from Oct 30, 2023 to Feb 8, 2024.

  • Bash Arrays: Examples & Explanations

    • Introduced the correct way to return all elements in the array instead of default arguments.
    • Added guidance on array slicing, indexing, and slicing strings for diverse range of results.
    • Enhanced examples of array element printing, both in regards to individual and range of elements.
    • Emphasized the importance of using [@] when referring to all array elements, alongside the benefits of enclosing parameter expansion in quotes to keep any spaces present within specific array elements.
  • Array Slicing: Expanded Information

    • Broadened scope on array slicing knowledge, detailing functionality in according with Bash 4.0 syntax, individual element accessing, and range of elements.
    • Elucidated how both array indexing and string slicing methods can be utilised to achieve array slicing-esque outcomes.
  • String Slicing: Theory and Practice

    • Expanded theoretical understanding of string slicing in Bash.
    • Revamped examples of extracting string portions using slicing.
    • Clarified the role of the second number in slice notation, explaining it defines the maximum extracted substring length instead of dictating the ending index.
    • Included practical examples of string sections extraction, detailing obtaining the available string characters when the desired count exceeds the string length.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Bug: Substring in Bash :: Slicing - Examples incorrect

1 participant

AltStyle によって変換されたページ (->オリジナル) /