Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
⚡️ From finding text to search and replace, from sorting to beautifying text and more 🎨
Branch: master
Clone or download
learnbyexample corrected string comparison, always use quotes
#24
https://unix.stackexchange.com/questions/131766/why-does-my-shell-script-choke-on-whitespace-or-other-special-characters

the linked issue failure corner case was when the output of command contained glob characters, for ex: `a[2]`
if string is unquoted on RHS of comparison operator, it is treated as glob comparison, not string comparison
hence why quotes are needed here
Latest commit 5d7b6a6 Mar 3, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
exercises corrected string comparison, always use quotes Mar 3, 2019
images
overview_presentation
README.md
file_attributes.md
gnu_awk.md
gnu_grep.md added PCRE example for matching multiple patterns Jan 31, 2019
gnu_sed.md examples to distinguish \b, \< and \> Aug 7, 2018
miscellaneous.md
perl_the_swiss_knife.md
restructure_text.md
ruby_one_liners.md some more fine tuning of examples/descriptions Nov 28, 2018
sorting_stuff.md
tail_less_cat_head.md
whats_the_difference.md
wheres_my_file.md

README.md


Command Line Text Processing

Learn about various commands available for common and exotic text processing needs. Examples have been tested on GNU/Linux - there'd be syntax/feature variations with other distributions, consult their respective man pages for details.

⚠️ 🚧 Work in progress, stay tuned...


Chapters

Rough drafts

Possible additions

  • Parsers for html, xml, csv, json, etc
  • Renaming files
  • other commands like split, combine, datamash, etc

Contributing

  • Please open an issue for typos/bugs/suggestions/etc
    • Even for pull requests, open an issue for discussion before submitting PRs
    • or gitter group chat for discussion as well as for help/mentorship
  • Share the repo with friends/colleagues, on social media, etc to help reach other learners
  • Contribute by donating on patreon or liberapay
  • In case you need to reach me, use gitter private chat
    • or mail me at echo 'yrneaolrknzcyr.arg@tznvy.pbz' | tr 'a-z' 'n-za-m'

Webinar recordings

Recorded couple of videos based on content in the chapters, not sure if I'll do more


exercises

Check out exercises directory to solve practice questions, right from the command line itself

As of now, only grep exercises has been added. Stay tuned for more


ebook

Includes only completed chapters

  • Read as ebook on gitbook
  • Download ebook for offline reading - link

Acknowledgements


License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License

You can’t perform that action at this time.