3 ms·
A sed binary is usually much smaller than an awk binary, either POSIX or GNU. The memory footprint of sed will be much more compact. However, sed has grown out
by chasil 3y ago
A sed binary is usually much smaller than an awk binary, either POSIX or GNU. The memory footprint of sed will be much more compact.
However, sed has grown out of the command language used by the tty editors, and is more difficult to program (although it is Turing-complete).
The awk language implements much of the syntax of C, and it is not difficult to write a very slow and inefficient script. This inefficiency is harder to reach in sed, because it takes more effort to abuse it.
O'Reilly's book on sed and awk is available free online, both to browse and to download as a ZIP.
https://docstore.mik.ua/orelly/unix/index.htm https://docstore.mik.ua/orelly/unix/index.htm
- Anthony-G 3y agoFor those who care about copyright, that URL is not from O’Reilly; it’s a copy of a book-set that O’Reilly used to distribute via CD-ROM – with a nice user interface that used web technologies (even included a search feature). O’Reilly could make it available for free – as they’ve done so for other books such as Apache Security¹ or Using Samba² – but they still (as is their right) expect you to pay for the sed & awk book³. ¹ https://blog.ivanristic.com/2015/02/apache-security-ten-years-later.html https://blog.ivanristic.com/2015/02/apache-security-ten-year... ² https://www.oreilly.com/openbook/samba/book/ https://www.oreilly.com/openbook/samba/book/ ³ https://www.oreilly.com/library/view/sed-awk/1565922255/ https://www.oreilly.com/library/view/sed-awk/1565922255/