learnbyexample/Command-line-text-processing
:zap: From finding text to search and replace, from sorting to beautifying text and more :art:
repo name | learnbyexample/Command-line-text-processing |
repo link | https://github.com/learnbyexample/Command-line-text-processing |
homepage | |
language | Shell |
size (curr.) | 880 kB |
stars (curr.) | 9095 |
created | 2017-03-25 |
license | |
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.
:warning: :construction: Work in progress, stay tuned…
Chapters
- Cat, Less, Tail and Head
- cat, less, tail, head, Text Editors
- GNU grep
- GNU sed
- GNU awk
- Perl the swiss knife
- Ruby one liners
- Sorting stuff
- sort, uniq, comm, shuf
- Restructure text
- paste, column, pr, fold
- Whats the difference
- cmp, diff
- File attributes
- wc, du, df, touch, file
- Miscellaneous
- cut, tr, basename, dirname, xargs, seq
Rough drafts
Possible additions - seems like these won’t be coming any time soon :(
- 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
- 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
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 online ebook at gitbook
- Download PDF for offline reading using this link
Individual ebooks with more content, explanations, exercises, etc:
- GNU grep and ripgrep
- GNU sed
- GNU awk - coming soon…
Or, as part of Awesome Regex bundle from https://leanpub.com/b/regex
Acknowledgements
- unix.stackexchange and stackoverflow - for getting answers to pertinent questions as well as sharpening skills by understanding and answering questions
- Forums like Linux users, /r/commandline/, /r/linux/, /r/ruby/, news.ycombinator, devup and others for valuable feedback (especially spotting mistakes) and encouragement
- See wikipedia entry ‘Roses Are Red’ for
poem.txt
used as sample text input file
License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License