TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Handbook of Text manipulation on Unix

316 pointsby AbyCodesabout 13 years ago

15 comments

Nate75Sandersabout 13 years ago
Related 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:<p><a href="http://code.google.com/p/pyp/" rel="nofollow">http://code.google.com/p/pyp/</a>
评论 #3747868 未加载
lurielabout 13 years ago
The 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).
aghullabout 13 years ago
I 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.
bradlyabout 13 years ago
Unix for Poets is a great set of exercises for someone wanting to learn more about text manipulation with Unix tools.<p><a href="http://www.iro.umontreal.ca/~felipe/IFT6010-Automne2011/resources/Articles/UnixforPoets" rel="nofollow">http://www.iro.umontreal.ca/~felipe/IFT6010-Automne2011/reso...</a>
skrublyabout 13 years ago
Thanks 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.<p>Plus I enjoy stringing together one-off filters longer than my arm.
webnrrd2kabout 13 years ago
If 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.
Nate75Sandersabout 13 years ago
One useful addition to the section on streams would have been that of process substitution:<p><a href="http://tldp.org/LDP/abs/html/process-sub.html" rel="nofollow">http://tldp.org/LDP/abs/html/process-sub.html</a><p>This allows you to have more than just the standard streams.
评论 #3717647 未加载
评论 #3719059 未加载
pkruminsabout 13 years ago
Also take a look at my 3 e-books on awk, sed and perl: <a href="http://www.catonmat.net/books/" rel="nofollow">http://www.catonmat.net/books/</a>
danieldkabout 13 years ago
I once wrote this introduction to UNIX (which is unfortunately not complete, I lost the DocBook sources), that also provides an introduction to text manipulation.<p><a href="http://danieldk.eu/Writings/unixsystems.pdf" rel="nofollow">http://danieldk.eu/Writings/unixsystems.pdf</a>
pseudoswamyabout 13 years ago
Good post. How can I tell if a tool supports UTF-8 (or some other encoding) or not?
gasdaabout 13 years ago
join was new to me. I like it....<p>Always happy to learn a new command.
agentgtabout 13 years ago
This used to be a great site (ignore its very un-PC site name):<p><a href="http://bashcurescancer.com/" rel="nofollow">http://bashcurescancer.com/</a><p>It seems the site is down.
indubitablyabout 13 years ago
Thanks for this, had never heard of csplit. Too bad the OSX version sucks.
gurramanabout 13 years ago
Sort 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.<p>[1] <a href="http://www.laffeycomputer.com/rpl.html" rel="nofollow">http://www.laffeycomputer.com/rpl.html</a>
zwischenzugabout 13 years ago
So sad that the writer lets himself down in the first line.
评论 #3717751 未加载