8 ms·
Handbook of Text manipulation on Unix
- agentgt 15y agoThis used to be a great site (ignore its very un-PC site name): http://bashcurescancer.com/ http://bashcurescancer.com/ It seems the site is down.
- Nate75Sanders 15y agoRelated to this, pyp is worth taking a look at if you're interested in doing manipulation using python's libraries, but on the command line: http://code.google.com/p/pyp/ http://code.google.com/p/pyp/
- pixelbeat 14y agoThat's very similar to http://www.pixelbeat.org/scripts/funcpy http://www.pixelbeat.org/scripts/funcpy
- skrubly 15y agoThanks for this! I really like these kinds of summaries, because while I love grep and cut and wc and perl, there are commands in here I really haven't heard of. Plus I enjoy stringing together one-off filters longer than my arm.
- Nate75Sanders 15y agoOne useful addition to the section on streams would have been that of process substitution: http://tldp.org/LDP/abs/html/process-sub.html http://tldp.org/LDP/abs/html/process-sub.html This allows you to have more than just the standard streams.
- veyron 15y agoIt's bash-specific (sh doesn't support it)
- Nate75Sanders 15y agoIt's not bash-specific. Other shells have it.
- veyron 15y agoBut not the bourne shell
- nikcub 15y agonot POSIX.
- bradly 15y agoUnix for Poets is a great set of exercises for someone wanting to learn more about text manipulation with Unix tools. http://www.iro.umontreal.ca/~felipe/IFT6010-Automne2011/resources/Articles/UnixforPoets http://www.iro.umontreal.ca/~felipe/IFT6010-Automne2011/reso...
- pkrumins 15y agoAlso take a look at my 3 e-books on awk, sed and perl: http://www.catonmat.net/books/ http://www.catonmat.net/books/
- deleted 15y ago[deleted]
- zwischenzug 15y agoSo sad that the writer lets himself down in the first line.
- dfc 15y agoWhat are you referring to?
- shrikant 15y agoPossibly to the use of "A basic tenant" when the writer really meant "A basic tenet".
- delluminatus 15y agoHe must be referring to the use of "tenant" when "tenet" was meant.
- gasda 15y agojoin was new to me. I like it.... Always happy to learn a new command.
- aghull 15y agoI like how it's laid out from the most specific tools that are easy to understand and eventually leads to the pocketknives of sed and awk that beginners might not need until they've exhausted the potential of the previous commands.
- gurraman 15y agoSort of related: rpl[1] is an often overlooked tool for replacing text across multiple files. Terser than "perl pie" and a few nice features like simulation mode. [1] http://www.laffeycomputer.com/rpl.html http://www.laffeycomputer.com/rpl.html
- indubitably 15y agoThanks for this, had never heard of csplit. Too bad the OSX version sucks.
- danieldk 15y agoI once wrote this introduction to UNIX (which is unfortunately not complete, I lost the DocBook sources), that also provides an introduction to text manipulation. http://danieldk.eu/Writings/unixsystems.pdf http://danieldk.eu/Writings/unixsystems.pdf
- luriel 15y agoThe Unix Programming Environment by Kernighan and Pike and The AWK Programming Language are still the best books one can read about Unix text manipulation, and about Unix, period. (Part of the point is that in Unix text is supposed to be the universal language).
- pseudoswamy 15y agoGood post. How can I tell if a tool supports UTF-8 (or some other encoding) or not?
- webnrrd2k 15y agoIf you like this, then check out Unix Power Tools. It's full of exactly this kind of stuff, with broader and deeper coverage. I highly recommend it -- I consider it one of the top ten or so books for a new programmer to spend some time with.